Blog2017 ≫ Think I have battery and power level checking on a raspberry pi now

Nearly. Not quite working. Following instructions here1 and on the adafruit website, I'm trying to read outputs from the adafruit powerboost that Clare bought me last year so that the pi can tell a) is the battery level good? b) is the battery being charged? I'm reading from the gpio pins, and can tell something is attached there but I'm not getting a reading that "hey the battery is low" or "there's no external power plugged in". To be fair* the battery is not low, so that could explain that one. But I'm clearly not reading the usb value, and can't tell if there's external power charging the battery. That's the one I'm most interested in, I want this pi to stop what it's doing and shut down nicely when the power to it is cut, not when the backup battery starts to run down... more work to be done.

Man alive H says "to be fair" a lot, he has picked it up from Clare...

⬅️ :: ➡️

Paul Clarke's blog - I live in Hythe near Folkestone. Married to Clare + dad to 2, I am a full-stack web developr, and I do js / nodejs, some ruby, python, php ect ect. I like pubbing, running, eating, home automation and other diy stuff, history, family tree stuff, TV, squirrels, pirates, lego, + TIME TRAVEL.