How to detect Electron goes from microUSB power to battery?

@frlobo I think this thread addresses that