0
0
IOT Protocolsdevops~30 mins

Azure IoT Hub overview in IOT Protocols - Mini Project: Build & Apply

Choose your learning style9 modes available
Azure IoT Hub Overview
📋 What You'll Learn
💡 Why This Matters
🌍 Real World
Azure IoT Hub is used by companies to securely connect and manage many smart devices, like sensors and machines, sending data to the cloud.
💼 Career
Understanding how to organize device data and connection info is a key skill for IoT engineers and DevOps professionals working with cloud device management.
Progress0 / 4 steps
1
Create a list of device IDs
Create a list called device_ids with these exact values: 'device001', 'device002', and 'device003'.
IOT Protocols
Need a hint?

Use square brackets [] to create a list and separate items with commas.

2
Add IoT Hub connection string
Create a string variable called iot_hub_connection_string with the exact value 'HostName=example.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=ABC123'.
IOT Protocols
Need a hint?

Use quotes to create a string and assign it to the variable.

3
Create a dictionary for device status
Create a dictionary called device_status where each device ID from device_ids is a key and the value is 'offline' initially. Use a dictionary comprehension with device_ids.
IOT Protocols
Need a hint?

Use {key: value for key in list} to create the dictionary.

4
Print the device status dictionary
Write a print statement to display the device_status dictionary.
IOT Protocols
Need a hint?

Use print(device_status) to show the dictionary.