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:
|
while True:
|
||||||
|
try:
|
||||||
data = aio.receive(digital.key)
|
data = aio.receive(digital.key)
|
||||||
|
except RequestError as re:
|
||||||
|
pass # feed with no data will return 404
|
||||||
if int(data.value) == 1:
|
if int(data.value) == 1:
|
||||||
print('received <- ON\n')
|
print('received <- ON\n')
|
||||||
elif int(data.value) == 0:
|
elif int(data.value) == 0:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue