I have a SparkFun battery shield, with an external power source plugged into VIN. The Photon runs off battery, or charges the battery when plugged in - things seem to work.
I’d like to turn on an LED when plugged in, like a “charging light”. How can I monitor the plugged in state?
Thank you. I came up with the same solutions and came back to write them when I saw your reply.
I ended up soldering a short wire to the surface mount charge LED and then to a digital pin (although I assume an analogue pin would have worked too). This works.
I didn’t want to just monitor the charge level in case it was a “noisy” measurement. This also would take more software than I liked I monitor the charge level to turn my charge LED green when the battery is >90% full.
1 Like