From 302fcca696e5b73253e8934ea6858be6433ca664 Mon Sep 17 00:00:00 2001 From: tyeth Date: Fri, 29 Nov 2024 23:39:56 +0000 Subject: [PATCH] Addresses issue raised in #159 --- examples/basics/digital_out.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/basics/digital_out.py b/examples/basics/digital_out.py index e92d3b6..5da4f99 100644 --- a/examples/basics/digital_out.py +++ b/examples/basics/digital_out.py @@ -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: