Contents
ARDUINO PROJECT HANDBOOK
VOLUME 2:
25 SIMPLE ELECTRONICS
PROJECTS FOR BEGINNERS
MARK GEDDES
SAN FRANCISCO
ARDUINO PROJECT HANDBOOK, VOLUME 2. Copyright 2017 by Mark Geddes.
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-818-7
ISBN-13: 978-1-59327-818-2
Publisher: William Pollock
Production Editor: Serena Yang
Cover and Interior Design: Beth Middleworth
Cover Photo: Max Burger
Developmental Editor: Liz Chadwick
Technical Reviewer: Sam Stratter
Copyeditor: Rachel Monaghan
Compositor: Serena Yang
Proofreader: James Fraleigh
Circuit diagrams made using Fritzing (http://fritzing.org/).
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
The Library of Congress has catalogued the first volume as follows:
Names: Geddes, Mark.
Title: Arduino project handbook : 25 practical projects to get you started /
by Mark Geddes.
Description: San Francisco : No Starch Press, [2016] | Includes index.
Identifiers: LCCN 2015033781| ISBN 9781593276904 | ISBN 1593276907
Subjects: LCSH: Programmable controllers. | Microcontrollers--Programming. |
Science projects--Design and construction. | Arduino (Programmable
controller)
Classification: LCC TJ223.P76 G433 2016 | DDC 629.8/9551--dc23
LC record available at http://lccn.loc.gov/2015033781
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. 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 author 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.
CAMERON AND JEMMA, YOU ARE THE CREATORS AND MAKERS OF THE FUTURE.
THIS BOOK IS FOR YOU!
Acknowledgments
Once again, many thanks to Bill Pollock and the fantastic team at No Starch Press for their dedicated support and guidance in the creation of this book, particularly Liz Chadwick and Serena Yang for being so patient through the process. Thanks also to Sam Stratter for his technical reviews and suggestions.
This book wouldnt exist if it wasnt for the inspirational Arduino founders; Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis. Thank you again for introducing me and the world to the wonder that is Arduino.
Special thanks to Warwick Smith, James Newbould, Joey Meyer, Chase Cooley, Onur Avun, Nick Koumaris, Chris Campbell, Mouad Er Rafay, Pololu, and Brainy-Bits.com for their amazing support and kind permission to reproduce their projects. The creativity of the ever-growing Arduino community never ceases to amaze me.
Thanks to everyone who read Arduino Project Handbook, Volume 1 for the kind words and messages of encouragementits made writing this volume that little bit easier.
Finally, I have to thank my wonderful wife, Emily, for being so supportive and patient over the last yearI promise that my man cave will not expand any further!
Introduction
Welcome to Arduino Project Handbook, Volume 2. If you havent read the first volume, dont worryeach project in this book is completely independent and designed to gently introduce you to the world of building with Arduino. Well cover some of the important aspects of getting started with Arduino here and in the next chapter, so if youve read Volume 1 you can either skim through as a refresher or skip ahead to dive straight into the new projects.
This book uses the Arduino Uno, a small, inexpensive computer that can be programmed to control endless devices and creations. Youll soon use the Arduino to control a whole host of projects, like a musical keyboard, temperature-controlled fan, digital thermometer, fingerprint entry system, and many others.
The Arduino board is composed of two main elements: the hardware, or microcontroller, which is the brain of the board; and the software that youll use to send your program to the microcontroller. The software, called the Arduino integrated development environment (IDE), is available free for download, and Ill show you how to use it to set up a simple project in the primer.
ABOUT THIS BOOK
What inspired me to write this book? The internet is bursting with tutorials, videos, and articles covering the Arduino and potential projects, but many lack detailed visuals or the code required to build these projects. This book is intended to help you build simple projects that will inspire you to create your own inventions as you apply the skills and techniques that youll learn.
NOTE
In this book youll create your projects on a breadboard. This is the best way to learn about how circuits work, because the connections are not permanent; if you make a mistake, you can just unplug the wire or component and try again.
Each project includes a description of what it will do, the items youll need, pictures of the setup, simple step-by-step instructions with tables for quick connection references, a circuit diagram (see .
FIGURE 1: The circuit diagrams in this book were created with Fritzing (http://www.fritzing.org/), a free, open source program.
At the beginning of each project, I include an indication of the cost of the components required in addition to the Arduino Uno (see ) and an estimated time for the build. At the end, I provide a troubleshooting section specific to that project.
TABLE 1: The cost indication used in this book
INDICATOR | COST |
$ | $1$9 |
$$ | $10$19 |
$$$ | $20$29 |
$$$$ | $30+ |
Ive written this book to teach you how to create your own gadgets. By giving you the technical know-how, I allow you to focus on the creative design element. The idea is that learning the function of circuits can open up your imagination to ways of using those circuits practically. Although I dont delve deeply into electronics theory or programming, the projects in this book progress steadily in compexity and will give you a good starting point.