Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi for Secret Agents

You're reading from   Raspberry Pi for Secret Agents Turn your Raspberry Pi into your very own secret agent toolbox with this set of exciting projects! 

Arrow left icon
Product type Paperback
Published in Apr 2013
Publisher Packt
ISBN-13 9781849695787
Length 152 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Stefan Sjogelid Stefan Sjogelid
Author Profile Icon Stefan Sjogelid
Stefan Sjogelid
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Raspberry Pi for Secret Agents
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Up to No Good FREE CHAPTER 2. Audio Antics 3. Webcam and Video Wizardry 4. Wi-Fi Pranks – Exploring your Network 5. Taking your Pi Off-road Index

Scheduling your audio actions


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.

Start on power up

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 autorun solution. Right now, the script doesn't do much, just prints out the IP address of the Pi.

You can try running the script any time using the following command:

pi@raspberrypi ~ $ /etc/rc.local

We could just jam our list of commands right in...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime