title | description | author | ms.author | ms.service | ms.topic | ms.date | ms.collection | zone_pivot_groups | ms.custom | ms.devlang |
---|---|---|---|---|---|---|---|---|---|---|
Send device telemetry to Azure IoT Hub quickstart |
This quickstart shows device developers how to connect a device securely to Azure IoT Hub. You use an Azure IoT device SDK for C, C#, Python, Node.js, or Java, to build a device client for Windows, Linux, or Raspberry Pi (Raspbian), then you connect and send telemetry. |
timlt |
timlt |
iot-develop |
quickstart |
08/03/2021 |
embedded-developer, application-developer |
iot-develop-set1 |
mode-other, devx-track-azurecli, contperf-fy22q2 |
azurecli |
Applies to: Device application developers
:::zone pivot="programming-language-ansi-c"
[!INCLUDE iot-develop-send-telemetry-iot-hub-c]
:::zone-end
:::zone pivot="programming-language-csharp"
[!INCLUDE iot-develop-send-telemetry-iot-hub-csharp]
:::zone-end
:::zone pivot="programming-language-java"
[!INCLUDE iot-develop-send-telemetry-iot-hub-java]
:::zone-end
:::zone pivot="programming-language-nodejs"
[!INCLUDE iot-develop-send-telemetry-iot-hub-node]
:::zone-end
:::zone pivot="programming-language-python"
[!INCLUDE iot-develop-send-telemetry-iot-hub-python]
:::zone-end
If you no longer need the Azure resources created in this quickstart, you can use the Azure CLI to delete them.
Important
Deleting a resource group is irreversible. The resource group and all the resources contained in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources.
To delete a resource group by name:
-
Run the az group delete command. This command removes the resource group, the IoT Hub, and the device registration you created.
az group delete --name MyResourceGroup
-
Run the az group list command to confirm the resource group is deleted.
az group list
In this quickstart, you learned a basic Azure IoT application workflow for securely connecting a device to the cloud and sending device-to-cloud telemetry. You used Azure CLI to create an Azure IoT hub and a device instance. Then you used an Azure IoT device SDK to create a temperature controller, connect it to the hub, and send telemetry. You also used Azure CLI to monitor telemetry.
As a next step, explore the following articles to learn more about building device solutions with Azure IoT.
[!div class="nextstepaction"] Control a device connected to an IoT hub [!div class="nextstepaction"] Send telemetry to IoT Central [!div class="nextstepaction"] Connect an MXCHIP AZ3166 devkit to IoT Central