Code: Select all
from machine import Pin, UART
uart = UART(1,115200)
ch = uart.read(1)
print("the code never reaches here without an input")
I don't want this to be the case, I want to make it so that it gives up reading and continues with the rest of the program if it doesn't read anything. So I want to enable a timeout or a check that the value isn't 0 or something
How do I go about doing that? I've tried to look through the micropython documentation for machine.UART but I can't see anything
Thanks in advance