Oct-16-2023, 09:28 PM
Why doesn't this leave the while loop?
b''
b''
b'%'
b'%'
b'%'
b'%'
Timed out waiting for Bootloader Active Character. Please close window and try again
#wait for % and then move on indata = "" Counter = 0 while indata != "%": indata = ser.read() print(indata) Counter += 1 if Counter > 5: sys.exit("Timed out waiting for Bootloader Active Character. Please close window and try again")Result:
b''
b''
b'%'
b'%'
b'%'
b'%'
Timed out waiting for Bootloader Active Character. Please close window and try again