Detect if USB is connected
Posted: Mon Apr 06, 2020 3:27 pm
Hello,
I am using ESP32 WEMOS LOLIN32 board.
The project I am developing is using an external battery to run. I am trying to use USB connection only for charging the battery, and to stop the program execution when it is connected.
Is there any solution to detect (pin, register, interrupt, etc) if USB is connected without changing the hardware (soldering wires to VBUS)?
I can't find anywhere on the internet this information.
Thank you!
I am using ESP32 WEMOS LOLIN32 board.
The project I am developing is using an external battery to run. I am trying to use USB connection only for charging the battery, and to stop the program execution when it is connected.
Is there any solution to detect (pin, register, interrupt, etc) if USB is connected without changing the hardware (soldering wires to VBUS)?
I can't find anywhere on the internet this information.
Thank you!