Microvisor Sample Code
Microvisor Public Beta
Microvisor is in a pre-release phase and the information contained in this document is subject to change. Some features referenced below may not be fully available until Microvisor’s General Availability (GA) release.
This page is a jumping off point to take you to our growing number of Microvisor sample applications and demos.
Samples and demos
Basic HTTP communications
This application demonstrates of Microvisor’s HTTP communications System Calls.
Built from our FreeRTOS demo code, the multi-task code shows you how to configure and open a network channel for HTTP communication, and to issues requests to a cloud service. It uses Microvisor’s interrupt-driven notification mechanism to determine when data has been returned, and to set a ‘data ready’ flag for the main application to process and log the received JSON data.
This sample does not require any additional hardware beyond the Nucleo Development Board.
This sample also demonstrates the use of a UART serial bus for local application logging. This feature is optional but if you intend to try it, you will need an FTDI USB-to-serial cable.
There are full setup instructions alongside the source code.
IoT device demo
This application is built from our FreeRTOS demo code and is designed to run on the Microvisor Nucleo Development Board.
It makes use of an MCP9808 temperature sensor and a Holtek HT16K33-driven seven-segment, four-digit LED display. Both connect to the same I2C bus. The code demonstrates how this bus is configured and operated through the STMicro ST32U585 HAL.
The demo also uses a LIS3DH accelerometer (not shown in the photo above).
Check out the source code Read Me for full hardware setup details.
The code makes use of Microvisor’s HTTP communications System Calls to POST
data generated by the temperature sensor to the cloud. The sample uses the online service Beeceptor as a mock target API to consume this sensor data. You do not need a Beeceptor account.
Weather device demo
This sample weather readout application is based on the Microvisor Nucleo Development Board with the addition of an HT16K33-driven 8x8 LED matrix. You will also require an OpenWeather account for access to the OpenWeather API.
The display connects via I2C, and the code demonstrates how this bus is configured and operated through the STMicro ST32U585 HAL.
Access to the OpenWeather API is mediated by Microvisor’s HTTP communications System Calls. Responses are processed using cJSON and the data accessed to generate messages that will scroll across the display and to select a weather condition icon to show.
The source code Read Me contains complete hardware and software setup instructions.
Remote debugging demo
This sample provides a basic user application that you can use to try out Microvisor’s remote debugging feature. It uses the Microvisor Nucleo Development Board but no other hardware components.
For more information on remote debugging under Microvisor, please see this guide.
The source code Read Me contains complete hardware and software setup instructions.
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.