I’m using my Photon in a Sparkfun WeatherShield powered by a solar panel and battery. Unfortunately, a wire from the panel fell off last week, the battery ran down, and the Photon committed seppuku. Particle was very gracious in sending me a new one but I can’t be swapping out Photons every time the battery goes too low.
Is there some system call I can give to gracefully shut down the Photon if the battery falls below a certain threshold? There are a number of other threads on this topic but they’re for the Electron. There’s one for the Photon but I didn’t really see a solution there.