HTCC-AB01 - check if USB cable is connected

Hello, is there any easy way to check if HTCC-AB01 is connected to external 5V via USB cable?
Regards Tomasz

You can use a multimeter.

I think it is not the solution…

Can you be more specific about the problem?

Of course, I need to check (by software) if my module is connected to external 5V or is operating on battery.

While I was using a different heltec board I used two equal resisters to make a voltage divider connected from the 5V output pin to ground with a tap off where the resisters were soldered together to connect to one of the gpio input pins. So it would get ~2.5V when on USB and 0v when on battery.

1 Like

Thank you! This is what I did today (2*470K divider and GPIO5), but I hope it can be done without external parts - maybe some predefined procedure to check if battery is charging?