Merge pull request #160 from adafruit/digitalout-no-feed-value

Addresses issue raised in #159
This commit is contained in:
Tyeth Gundry 2024-12-06 17:47:42 +00:00 committed by GitHub
commit a3fd30ac80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,10 @@ led.direction = digitalio.Direction.OUTPUT
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: