Page 1 of 1

Booting normal or serial/usb

Posted: Fri Aug 09, 2019 11:22 am
by McDiver
Hi
In my code i need to check if the module booted in normal mode or with usb/serial connected.
How can i check that ?

Tommy

Re: Booting normal or serial/usb

Posted: Fri Aug 09, 2019 11:42 am
by Roberthh
Which board are you using? On STM32 board, you can check whether USB is connected e.g. with pyb.USB_VCP.isconnected() (http://docs.micropython.org/en/latest/l ... sconnected).
On ESP32 and ESP8266 this is not possible, since the connect through UART.