Step by step guide
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

debug_ser.py 428B

1234567891011121314151617
  1. import serial
  2. with serial.Serial(port='COM6', timeout=1) as ser:
  3. ser.baudrate = 74880
  4. while True:
  5. msg = ser.readline()
  6. if msg:
  7. try:
  8. print(msg.decode(), flush=True, sep='' ,end='')
  9. except:
  10. pass
  11. if msg == b'ld\r\n':
  12. ser.baudrate = 74880
  13. if msg == b'[OTA] End\r\n':
  14. ser.baudrate = 115200