2018-04-01
How i keep my Raspberry Pi busy
Since July 2017, i have my first one running motionEyeOS as a CCTV camera on a regular basis. Two weeks ago, i even built a custom UPS for it, also known as Uninterruptible Power Supply, to make it somewhat independent from a power source. The "off-the-shelf" parts for this project were a 5V relay module with "low level trigger", charging module with "battery protection", boost converter, and 3300uF 6.3V capacitor, which results in a much cheaper solution than a Adafruit Powerboost 1000C.
My second and last Raspberry Pi Zero W runs since January of this year, but permanently and with a wider range of tasks. I already got it to break down several times, by giving it more load than it can handle, which is not that difficult, since it has only a single-core CPU at 1 GHz and 512 MB RAM. But finally, i got it under control by giving every job only a certain time span to do its thing, just like shift work. And the built-in hardware "watchdog" tries to keep it all going by checking the heartbeat of the software.
For example, it takes with "raspistill" and the camera module one photo every 60 seconds, and it pauses twice each hour for ten minutes, as instructed in my shell script. Because the task is not mission critical, since it's just looking out the window and collecting images of a castle nearby. The given silent period is the chance for FreshRSS to check feeds for updates every half an hour. My Perl script tries to get new content for my parents from the BBC server every 30 minutes too. Occasionally, i also use it to develop and test new things, which can tear it down completely, or even corrupt the microSD card, if i forget to put all the code i have running to sleep.