We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9addd21 commit c8885f1Copy full SHA for c8885f1
examples/azureiot_simpletest.py
@@ -1,4 +1,4 @@
1
-import microcontroller
+from random import randint
2
import board
3
import busio
4
from digitalio import DigitalInOut
@@ -36,9 +36,9 @@
36
device_id = 'Blinka'
37
38
# Send a Device-to-Cloud message
39
-cpu_temp = microcontroller.cpu.temperature
40
-print('Sending Temperature to Azure IoT Hub...')
41
-hub.send_device_message(device_id, str(cpu_temp))
+print('Sending Data to Azure IoT Hub...')
+data = randint(0, 100)
+hub.send_device_message(device_id, str(data))
42
print('Data Sent!')
43
44
# Receive a Cloud-to-Device message
0 commit comments