Since CHIP runs Linux, it should be shut down gracefully, not abruptly by removing power or a hard reset. But CHIP is often used as an embedded system without any user interface. In those cases, it can be difficult to know if it has successfully booted, and is difficult to trigger a graceful shutdown. This program solves both problems.
When started by at boot time, the blinking status LED indicates a successful boot. Its continuing blinking indicates that CHIP hasn’t crashed.
When the reset button is briefly pressed, the blink program will initiate a graceful shutdown. DO NOT PRESS AND HOLD THE RESET BUTTON! That cuts power without a graceful shutdown.
Blink is now more flexible than before. It can blink an external LED (or whatever) on a GPIO output pin, either instead of or in addition to CHIP’s status LED. It can also monitor an external button (or whatever) on a GPIO input pin, either instead of or in addition to CHIP’s reset button. It can also add monitoring the battery charge level so that it does a graceful shutdown when the battery level goes below a given percentage. It can also monitor the AXP209’s temperature and do a shutdown when it exceeds a threshold. Finally, both battery and temperature monitoring can configure a warning threshold and trigger a configured GPIO.
Since blink can be disabled from monitoring the reset button, I think it is more PocketCHIP-friendly now.
You can find blink at: https://github.com/fordsfords/blink/tree/gh-pages
(Edited to reflect new version.)