Implementation of the Azure SDK for C Arduino on a RPi Pico W including Telemetry and CD Messages and extended to include Direct Methods and Twinning …
The Azure SDK for C Arduino is an implementation of the Azure Embedded SDK for C for Arduino devices. This implements the IoT Hub functionality with various Arduino Devices. That repository has support for a range of embedded devices that run Arduino with WiFi connectivity including the ESP8266 but not the RPi Pico W running Arduino. The repository discussed here extends that functionality to the Raspberry Pi Pico W device. Also, the ESP8266 implementation only has some simulated telemetry and Cloud to Device Messaging. This repository adds some real devices, Direct Methods and Device Twinning.
- Azure IoT Hub Arduino Raspberry Pi Pico with Telemetry
- Azure SDK for C Arduino
- Azure Embedded SDK for C
- Context & IoT Hub Summary (this)
- Create an IoT Hub and Device
- IoT Hub Connection Strings
- Get Connection Strings …Scripts
- Pico W Setup with Arduino
- Azure SDK for C Arduino Setup
- The Repository with Extended Features.
- About furthering the SDK Implementation
- CD Messages
- Direct Methods
- GET Device Twin Doc
- Device Twin Prop PATCH
- The rest are coming:
- The src lib.
Azure IoT Hub is a Platform as a Service (PaaS) providing a structured connectivity for Embedded Devices to send Telemetry back to the Cloud for live or stored processing, and for activating actuators on the devices based upon that processing or from schedules. The devices can be very simple fronts for sensors and actuators only requiring internet connectivity. More complex configurations are available where some intelligence is implemented in the devices or where an edge device marshalls the connectivity of multiple devices to the hub and may implement some of the hub logic.
A simple exmaple would be temperature sensor and a fan. The device periodically sends the temperature as TELEMETRY to the hub. When a certain temperature is reached, the hub activates a fan on the device. A slighly more complex arrangement would have the Hub set that trigger temperature on the device which directly activates the fan when it is reached. The hub would be able to communicate new trigger values to the device as rquired. This can be implemented by DIRECT METHODS where the hub calls methods on the device. An alternative is DEVICE TWINS where the hub has the temeprature as a property amongst a list of DESIRED PROPERTIES whose values can be communicated to the device to be targeted for implementation. This can be communicated as a whole, for example afer booting the device can request the complete TWIN DOCUMENT, or be sent PATCHES when properties (read settings) change on the hub. Whilst the previous hub<–>device communications tend to require acknowledgement there are also DEVICE 2 CLOUD MESSAGES which are typically one way (although they can require an ACK) and are not meant to activate actions on the device.
The Azure Embedded SDK for C provides a framework for implementing Azure IoT Hub connectivity by simple low level embedded devices. Unlike the Higher Level Azure IoT Hub SDKs (.NET, Python, Node.js etc) which come with precomplied (Nuget) packages, Azure Embedded SDK for C requires compile time build of the functionality. The Azure SDK C Arduino is an implemention for some specific Arduino devices.
Whilst there is not a board support package in the Arduino SDK for the Raspberry Pi Pico W, the ESP8266 BSP is easily ported to the RPi Pico W with a suitable OS installed. This BSP only implements a simple telemtry example as well as CD Messaging at a simple level. The Azure IoT Hub Arduino Raspberry Pi Pico with Telemetry repository implements a range of physical sensors as well Direct Methods (eg set the Telemetry rate, turn it off and on) and Device Twinning. This extra functionality is direct port in parts of that functionality in the Azure Embedded SDK for C.
Note that DEVICE PROVISIONING is not a consideration here. It is envisaged that the OS and Sketch builds are manually installed. Any build updates, apart from configuration settings that can be handled by Twinning, require further manual deployments. Such OTA updates are not available.
As alternative, there are a number of direct implementations of Azure RTOS for the RPi Pico on GitHub.
|< Prev:||Blazor Helpers Server App||Dynamic CSS|
|This Category Links|
|Category:||Pico W AzSDK Index:||Pico W AzSDK|