Book Image

Raspberry Pi Blueprints

Book Image

Raspberry Pi Blueprints

Overview of this book

Table of Contents (17 chapters)
Raspberry Pi Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The Raspberry Pi is a small form factor, single board, ARM-based computer. It is capable of running on many desktop applications that can be run on a standard Linux computer. While the Pi is only slightly larger than a credit card, it uses very little power. As such, it has become very popular among the hacker and maker community, which uses the Pi to integrate more computing power in their projects.

The Pi is very easy to set up and in less than 20 minutes, you can run it on a modified version of popular, Linux-based operating systems. It will function just like you would expect a desktop PC to. Thanks to its small form factor, many people have used it as an alternative to a traditional PC for fast access to applications and the Internet. Since the Pi draws very little power, it can be left running.

Where the Pi really excels is that it brings more computing power to hardware and electronics projects. This is made possible by a wide range of interfaces on the Pi that are typically not found on conventional computers.

This has led to a rise in new projects that are made using the Pi, which otherwise would have been considerably more difficult or expensive to make.

What this book covers

Chapter 1, Raspberry Pi Pirate Radio, introduces the Pi and gives an overview of its setup and configuration procedure and some fundamental Linux concepts. This chapter then demonstrates the basic use of the GPIO header and Python scripting.

Chapter 2, Portable Speaker System, explores how to use the Pi as a portable, battery-powered speaker system with a self-contained media server that can be used without any ties to a power supply or home network.

Chapter 3, Mini Retro Arcade Cabinet, demonstrates how the Pi can be used to create a mini arcade cabinet complete with a traditional joystick and button controls and how it can be used to play a range of classic arcade and console games.

Chapter 4, GPS-enabled Time-lapse Recorder, covers how to use the Pi as a time lapse recorder that can also capture the location of each image and trigger the image capture based on the current position of and distance traveled by the camera.

Chapter 5, Home Theater PC, explores the way in which the Pi can be used as a home theater PC using the popular XBMC media center software and a custom, purpose-built enclosure.

Chapter 6, Outdoor Weather Station, delves into the topic of interfacing hardware to the Pi using intermediate devices, in this case, Arduino. We also take a look at Python web applications running on the Pi.

Chapter 7, Home Security System, explores how to use the Pi as a hub for a wireless network of sensors and how this data can be used and displayed on a web application.

Chapter 8, Remote-operated Robotic Arm, focuses on how to use the Pi to control and monitor devices remotely in the form of a robotic arm that can be controlled through a web application.

Chapter 9, Magic Mirror, expands your knowledge of woodworking and designing, which will prove to be important skills for any further projects that you do in the field of electronics and physical computing.

Chapter 10, Bottle Xylophone, covers how the Pi, several servos, and some empty bottles can be turned into a musical instrument driven by MIDI files.

What you need for this book

This book assumes that you are familiar with the basics of the Raspberry Pi and Linux. Most of the code in this book is in Python with some C++. However, the source code for each of the projects is available alongside the book that can be used straight on the Pi.

Several of the projects will also deal with some basic electronics, and as such, some basic tools will be needed for the completion of some projects. However, note that at the start of each chapter, the procedure to build the electronics side of the project is explained step by step.

Some projects will also require access to woodworking tools in order to construct cases and enclosures. Usually, you will require just the common "garden shed" tools. However, there is information in the relevant chapters on what you can do if not having the correct tools causes an issue in the relevant chapters.

Who this book is for

This book is aimed at those are just getting started with the Raspberry Pi, already have a few small projects under their belt, and are looking to get into the world of hardware and physical computing projects.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames dummy URLs and user input are shown as follows: "Where path/to/raspbian_image.img is the extracted image file and sdX is the path to your SD card."

A block of code is set as follows:

#!/bin/bash
sleep 20
cd /home/pi
python player.py -d music --random -f 99.9 &

Any command-line input or output is written as follows:

ffmpeg -i file.mp3 -f s16le -ar 22.05k -ac 2 - | sudo ./pifm - freq 22050 stereo

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Files can be uploaded by right-clicking on them and selecting Upload."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/2901OS_ColoredImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.