Dear All, I am using Banana Pi M1 for my project, most of the time my system will be running on USB based power, but during power failure I would like my PI to work on battery, so that I can shut down my system properly, Is there any way to know when the system is running on battery and when system is running on mains.
I am running Raspbian OS
Thanks, Piyush