Scheduling your audio actions

In this section, we'll be looking at different techniques for triggering a recording or a playback, and optionally how to make it stop after a certain period of time.

Start on power up

The first method we'll cover is also the bluntest: 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, with 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 ...

Get Raspberry Pi for Secret Agents - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.