Skip to content

Commit a3fd30a

Browse files
authored
Merge pull request #160 from adafruit/digitalout-no-feed-value
Addresses issue raised in #159
2 parents 3b008d3 + 302fcca commit a3fd30a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/basics/digital_out.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040

4141

4242
while True:
43-
data = aio.receive(digital.key)
43+
try:
44+
data = aio.receive(digital.key)
45+
except RequestError as re:
46+
pass # feed with no data will return 404
4447
if int(data.value) == 1:
4548
print('received <- ON\n')
4649
elif int(data.value) == 0:

0 commit comments

Comments
 (0)