micropython/lora can not run the async example #13266
-
Trying to run this example: I was having similar trouble running a Has anyone run that example successfully and hopefully be able suggest what basic step I have missed out. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The code in Change async def recv_coro():
rx = await modem.recv(2000)
if rx:
print(f'Received: {rx}')
else:
print('Timeout!') to async def recv_coro():
while True:
rx = await modem.recv(2000):
if rx:
print(f'Received: {rx}')
else:
print('Timeout!') |
Beta Was this translation helpful? Give feedback.
The code in
recv_coro
runs only once. There is no loop.Change
to