Skip to content

Commit fba0837

Browse files
brentrubrentru
authored andcommitted
fix example for digitalio
1 parent 91202c8 commit fba0837

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/adafruit_io_simpletest_digital_out.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@
5151

5252
while True:
5353
# Get data from 'digital' feed
54+
print('getting data from IO...')
5455
feed_data = io.receive_data(digital_feed['key'])
5556

5657
# Check if data is ON or OFF
57-
if int(feed_data['value'] == 1):
58+
if int(feed_data['value']) == 1:
5859
print('received <- ON\n')
59-
elif int(feed_data['value'] == 0):
60+
elif int(feed_data['value']) == 0:
6061
print('received <= OFF\n')
6162

6263
# Set the LED to the feed value
6364
LED.value = int(feed_data['value'])
6465

65-
time.sleep(0.5)
66+
time.sleep(5)

0 commit comments

Comments
 (0)