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 v1.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 follow industrial protocols:
Modbus and Virtual Device services are 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.