Author Options:

Get battery charge level in Linux Answered

I have a small all-in-one motherboard that runs Linux (http://www.pcengines.ch/alix3d3.htm). It only needs 18V to power up and the battery from my Black and Decker drill is 18V. I am able to get the board  to power on by holding some wires on the leads of the battery. My question is, can Linux detect how much charge is left through a DC jack? Or would that take some extra circuitry? My goal is for the user to see a percentage of battery life left (like on a laptop) and maybe to shut the board down if the charge gets too low. Any advice is appreciated.


No, Linux cannot detect how much charge is left through a DC jack.
I doubt that the board has that feature either, so you would have to make something. You could then connect the device to a port on the board and get some software to run that does what you want it to.