at_commands.py 224 B

1234567891011121314151617
  1. import pyb
  2. led2 = pyb.LED(2)
  3. led3 = pyb.LED(3)
  4. uart = pyb.UART(1, 38400)
  5. command = "AT+VERSION?" + "\r\n"
  6. while True:
  7. uart.write(command)
  8. answer = uart.read()
  9. if answer:
  10. print(answer)
  11. break