| baudrate=115200, | baudrate=115200, | ||||
| ) | ) | ||||
| while ser.is_open: | |||||
| if ser.is_open: | |||||
| ser.write(b'At!Reset') | |||||
| sleep(0.5) | |||||
| ser.write(b'AT!ENTERCND="A710"') | |||||
| sleep(0.5) | |||||
| for cmd in command_order: | for cmd in command_order: | ||||
| ser.write(cmd) | ser.write(cmd) | ||||
| sleep(0.5) | sleep(0.5) | ||||
| print("{}\t->\t{}".format(cmd, ser.read(ser.inWaiting()).decode("utf-8"))) | |||||
| print(cmd) |