In this section, we'll be looking at different techniques of triggering a recording or a playback and optionally how to make it stop after a certain period of time.
The first method we'll cover is also the most blunt—how to start a recording or playback directly when powering up the Raspberry Pi. There isn't really a standardized way of auto-starting regular user applications on boot, so we'll have to improvise a bit to come up with our own way of doing what we want.
The Raspbian boot process is basically a collection of shell scripts being run one after the other, each script performing some important task. One of the last scripts to run is
/etc/rc.local, which is a good starting point for our custom ...