Merge pull request #160 from adafruit/digitalout-no-feed-value
Addresses issue raised in #159
This commit is contained in:
commit
a3fd30ac80
1 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue