Contents in Detail
20 EASY RASPBERRY PI PROJECTS
TOYS, TOOLS, GADGETS, AND MORE!
BY RUI SANTOS AND SARA SANTOS
SAN FRANCISCO
20 EASY RASPBERRY PI PROJECTS. Copyright 2018 by Rui Santos and Sara Santos.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-10: 1-59327-843-8
ISBN-13: 978-1-59327-843-4
Publisher: William Pollock
Production Editor: Laurel Chun
Cover Design: Mimi Heft
Interior Design: Beth Middleworth
Developmental Editor: Liz Chadwick
Technical Reviewer: Les Pounder
Copyeditor: Rachel Monaghan
Compositors: Meg Sneeringer and Laurel Chun
Proofreader: James Fraleigh
Cover artwork: Electronic Circuit Board by Creativity103 (licensed under CC BY 2.0).
Circuit diagrams made using Fritzing (http://fritzing.org/).
The following photographs are reproduced with permission:
Naturebytes.
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900;
www.nostarch.com
Library of Congress Cataloging-in-Publication Data:
Names: Santos, Rui (Writer on electronics), author. | Santos, Sara, author. |
Raspberry Pi Foundation.
Title: 20 easy Raspberry Pi projects : toys, tools, gadgets, and more! / Rui
Santos and Sara Santos.
Description: San Francisco : No Starch Press, Inc., [2018]
Identifiers: LCCN 2017046491 (print) | LCCN 2017059387 (ebook) | ISBN
9781593278717 (epub) | ISBN 1593278713 (epub) | ISBN 9781593278434 (pbk.)
| ISBN 1593278438 (pbk.) | ISBN 9781593278717 (ebook) | ISBN 1593278713
(ebook)
Subjects: LCSH: Raspberry Pi (Computer)--Programming--Popular works. |
Computer programming--Popular works.
Classification: LCC QA76.8.R15 (ebook) | LCC QA76.8.R15 S26 2018 (print) |
DDC 005.1--dc23
LC record available at https://lccn.loc.gov/2017046491
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Raspberry Pi is a trademark of the Raspberry Pi Foundation. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The information in this book is distributed on an As Is basis, without warranty. While every precaution has been taken in the preparation of this work, neither the authors nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
For the amazing people who have made this book possible (besides us)
Contents
Acknowledgments
We both want to thank the No Starch Press team who have done such a great job producing this book. Special thanks to Liz Chadwick for the invitation to write this book and for her endless patience editing our non-native English writing. We also want to thank Laurel Chun for her attention to detail and for producing this books beautiful layout. Thanks to Les Pounder for his technical contribution and suggestions.
Many thanks to the Raspberry Pi Foundation for developing this tiny but powerful computer that made electronics and coding more accessible to general public.
We must also thank our friends and family for being supportive throughout this entire journey. Finally, we would like to thank the Random Nerd Tutorials community who indirectly have also made this book possible.
Writing this book wouldnt have been possible if it wasnt for Sara Santoss work and support, and her tireless effort to meet all the deadlines. I thank her greatly.
Rui Santos
I would like to thank my coauthor Rui Santos for inviting me to take part in this journey. Thanks for showing me that we can work in something we love; we just have to chase our dreams.
Sara Santos
Introduction
Have you ever considered that you could buy a computer for $35? And no, were not talking about an ancient computer from a pawn shop. Were talking about the Raspberry Pia computer board about the size of a credit card. But dont be fooled by its fragile appearance; its much more powerful than it seems.
The Raspberry Pi was developed in the United Kingdom by Eben Upton, founder of the Raspberry Pi Foundation. Upton and his colleagues noticed a decline in the skills of students applying to study computer science at the University of Cambridge and realized it was because newer generations of students had grown up with computers that were easy to use. The students never needed to learn how computers really work and didnt have much opportunity to program or tinker. Upton developed the Raspberry Pi as a way to promote teaching basic computer science in schools. This is why the Pi is a bare board rather than a computer in a case: so everyone can see the components of a computer.
More than ten million Raspberry Pi boards have been sold since it was first introduced in 2012. The Raspberry Pi has become popular not just among students but also electronics hobbyists, tinkerers, computer scientists, and kids of all ages.
The Raspberry Pi can work as a regular computeryou can surf the web, send emails, write documents, watch videos, and so onbut thats not its main purpose. The Pi is something that you can experiment with, hack, and play with to build your own programs and inventions. The Raspberry Pi and similar boards made it not only possible but easy to get involved in the world of electronics and programming, resulting in an outpouring of creative inventions all over the globe. Now, its your time to invent something.
WHO IS THIS BOOK FOR?
This book is suitable for any beginners who want to make the most of the Raspberry Pi, whether thats kids who want to discover the world of electronics and programming, parents and educators who want to help teach children and students, or hobbyists and makers who want to use the Raspberry Pi to bring their ideas to life.
We dont assume any previous knowledge about the Raspberry Pi, circuits, or programming. If you do have some basic skills, this book will help develop them further and give you ideas for what to do next.
ABOUT THIS BOOK
20 Easy Raspberry Pi Projects is a collection of 20 projects to build with the Raspberry Pi. We believe that the best way to discover new concepts is through practice, and a project book is an excellent way to get started.
The book starts with a quick introduction to the Raspberry Pi and the Python programming language, and then jumps into the projects. The book follows a learn-by-doing approach, which means you dont need to spend countless hours learning theoretical concepts before actually building something cool.
Youll learn by building fun and interactive projects like a home surveillance system and a Wi-Fi controlled robot. Youll also design user-friendly interfaces to control electronics, make Internet of Things projects, build a website, create your own games, and much more.