Use the Example Code
The Xrt examples for Azure Sphere can be cloned from IOTech's public GitHub repository.
To use the examples, you must have installed Xrt on your development host, as described in this guide.
To clone the
xrt-examples repository, enter the following command:
git clone --branch v2.1-branch https://github.com/IOTechSystems/xrt-examples.git
The Azure Sphere examples are located under the
xrt-examples folder. Each example has a README.md file, which describes the example and how to build and run it.
A number of examples are provided that show how to build connected IoT applications using Edge Xrt deployed on an Azure Sphere module.
The examples show how an Xrt application can be used to communicate with OT devices (either physical or simulated) using the following industrial protocols:
Virtual Device Service is also supported on Azure Sphere. Please contact IOTech support if you require assistance with these device services.
Each example reads data values from the OT device, which are sent to a digital twin running on Azure IoT Hub. You can also use the digital twin to send commands back to the device connected to the Azure Sphere module.