‘try except else’ is a fixed usage, to judge whether there is data in the buffer, if it is not added, an error will be reported, because uart received None at the beginning of the serial port
Reply To: Raspberry Pi Pico controls stepper motor through serial port commandsbowei zhang2021-05-19T09:13:57+08:00