Skip to content

Commit

Permalink
Merge pull request #160 from adafruit/digitalout-no-feed-value
Browse files Browse the repository at this point in the history
Addresses issue raised in #159
  • Loading branch information
tyeth authored Dec 6, 2024
2 parents 3b008d3 + 302fcca commit a3fd30a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/basics/digital_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@


while True:
data = aio.receive(digital.key)
try:
data = aio.receive(digital.key)
except RequestError as re:
pass # feed with no data will return 404
if int(data.value) == 1:
print('received <- ON\n')
elif int(data.value) == 0:
Expand Down

0 comments on commit a3fd30a

Please sign in to comment.