pulkin / micropython

MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
https://micropython.org
MIT License
103 stars 30 forks source link

Вопрос об uart 0 #56

Closed parafagus closed 4 years ago

parafagus commented 4 years ago

Здравствуйте. Подскажите есть ли возможность полноценно работать с uart 0? При попытке получить данные с другого устройства я получаю очень странные результаты. Возможно это связана с тем, что там постоянно работает REPL и пытается обрабатывать ввод? Есть ли возможность отключить REPL?

pulkin commented 4 years ago

Yep, UART0 is REPL, UART1 is attached to GPS.

  1. You may invoke uos.dupterm(None, 1) and use UART0 to communicate with whatever. Please do not put it into boot.py or main.py as you will loose access to REPL and there is no such thing as 'safe mode' here.
  2. Or just use UART1 if no GPS involved in your project.
parafagus commented 4 years ago

Thank you very much.