A Better Time-lapse Photography Script
My first attempt at a time lapse script came up a little short. That script was intended to be quick and dirty. In order to make it easier to use, I’ve written some improved scripts.
Our CanSat is designed to start taking photos when the Raspberry Pi starts, and it will keep shooting until we pull the plug (or it runs out of disk space). On competition day, we don’t want to have to log into the Raspberry Pi to start the process. Ideally we would have it start automatically at start-up time.
While our first attempt achieved this, it wasn’t designed with the consideration that someone might like to use the Pi for something else while the time-lapse script was running. Some comments on the original post suggested this was a problem.
Finally, the preview pane was enabled by our last script, so as photos were being taken, the screen would become obscured. I’ve also addressed this in the new scripts.
To address these concerns, I’ve reworked the script so that is becomes a system service. We no longer need an additional user, or to modify the /etc/inittab file to allow for automatic login. The init script allows the system to start the service at boot time, and stop it at shut-down (if it is so configured). We can also better monitor when it is running, and start and stop it more easily. Suppressing the preview pane also helps allow the Pi to be used for other uses while photos are being taken.