while indata != "%":
indata = ser.read()
print (indata.decode())
Counter = Counter + 1
if Counter > 20:
sys.exit("Timed out waiting for response")
It always times out no matter what and the print statement verifies that “%” is being received. I even tried:
while indata.strip() != "%":
indata = ser.read()
print (indata.decode())
Counter = Counter + 1
if Counter > 20:
sys.exit("Timed out waiting for Bootloader Active Character. Please try again")
and it still never exits the loop. This is Python3.7 under Linux