Skip to content

Commit c8885f1

Browse files
author
brentru
committed
swap cpu temp for random int
1 parent 9addd21 commit c8885f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/azureiot_simpletest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import microcontroller
1+
from random import randint
22
import board
33
import busio
44
from digitalio import DigitalInOut
@@ -36,9 +36,9 @@
3636
device_id = 'Blinka'
3737

3838
# 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))
39+
print('Sending Data to Azure IoT Hub...')
40+
data = randint(0, 100)
41+
hub.send_device_message(device_id, str(data))
4242
print('Data Sent!')
4343

4444
# Receive a Cloud-to-Device message

0 commit comments

Comments
 (0)