ebook img

Learn Electronics with Arduino: An Illustrated Beginner’s Guide to Physical Computing PDF

386 Pages·2017·49.97 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Learn Electronics with Arduino: An Illustrated Beginner’s Guide to Physical Computing

Make: Learn ElEctronics with arduino An Illustrated Beginner s ’ guIde to PhysIcAl ComputIng Jody Culkin and Eric Hagan Copyright © 2017 Jody Culkin and Eric Hagan. All rights reserved. Printed in the United States of America. Published by Maker Media, Inc., 1700 Montgomery Street, Suite 240, San Francisco, CA 94111 Maker Media books may be purchased for educational, business, or sales promo- tional use. Online editions are also available for most titles (safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or Safari® Books Online Safari Books Online is an on-demand digital library that delivers expert content in both book and video form from the world’s leading authors in technology and business. Technology professionals, software developers, web designers, and busi- ness and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training. Safari Books Online offers a range of plans and pricing for enterprise, government, education, and individuals. Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hun- dreds more. For more information about Safari Books Online, please visit us online. How to Contact Us Please address comments and questions to the publisher: Maker Media 1700 Montgomery St. Suite 240 San Francisco, CA 94111 You can send comments and questions to us by email at dedication Dedicated to all of our students, past, present, and future. Their curiosity drives them and inspires us. iv contEnts Acknowledgments vii Back to Debugging Our Circuit 69 Summary 71 About the Authors viii Preface ix 4 Programming the Arduino 73 Arduino, Circuits, and Code: 1 Introduction to Arduino 1 Bringing Everything Together 74 Physical Computing 3 What’s an IDE? 75 Prototyping 3 Downloading the Arduino IDE: What Will I Need and Where Getting Started 78 Can I Get It? 4 The Sketch: The Basic Unit of Parts and Tools 5 Arduino Programming 90 Resources 12 Debugging: What to Do if the Summary 13 LED Isn’t Blinking 96 LEA4_Blink Sketch: An Overview 98 2 Your Arduino 15 setup() and loop(): The Guts of Parts of an Arduino 16 Your Code 101 Plug Your Arduino into Your Looking at loop(): What Happens Computer 20 Over and Over 109 Components and Tools 26 A Schematic of the Arduino 115 Summary 30 Building the Basic Circuit 118 SOS Signal Light: Creating More 3 Meet the Circuit 31 Complex Timing 125 The Circuit: Building Block of Summary 135 Electronics 32 The Schematic 37 5 Electricity and Metering 137 Using a Breadboard 42 Understanding Electricity 138 Building a Circuit 48 Build the Circuit Step by Step 140 A Look at the Battery 52 Electricity: An Overview 144 Power for Our Circuit: Electricity 55 Understanding Electricity: Debugging the Circuit 57 The Water Tank Analogy 148 The Multimeter 60 Voltage: The Potential 149 Using the Multimeter 65 Current: The Flow 159 v Resistance: Restricting the Flow 167 Serial Communication 269 Voltage, Current, Resistance: Adding the Speaker 278 Review 173 Adding the Photoresistor 282 How Do Voltage, Curent, and Summary 288 Resistance Interact? Ohm’s Law 177 8 Servo Motors 289 Components in Parallel and Series 180 Summary 192 Waving the Flags 291 Servos Up Close 292 6 Switches, LEDs, and More 193 Building the Servo Circuit Interactivity! 194 Step by Step 295 Digital Inputs and Outputs LEA8_Sweep Overview 301 Overview 195 What’s a for Loop? 304 Digital Input: Add a Buton 197 Operators 309 Looking at the Sketch: Variables 206 The for Loop in the Sketch 312 Digital Input Refresher 213 Add Interactivity: Looking at the Sketch: Conditional Turn the Flag 314 Statements 215 LEA8_Knob Explained 317 Add a Speaker and Adjust Two Flags Waving: Add a the Code 220 Second Servo Motor 320 Add Two More Buttons and LEA8_2_servos, First Look 322 Adjust the Code 227 Summary 332 Reviewing Electronic and Code 9 Building Your Projects 333 Concepts 236 Summary 239 Project Management 334 A Few Helpful Components 338 7 Analog Values 241 Types of Projects 342 There’s More to Life than On Other Versions of the Arduino and Of! 241 Board 345 Potentiometer Circuit, Step Document Your Project and by Step 246 Share It! 348 The LEA7_AnalogInOutSerial Summary 350 Sketch 254 A A ppendix: Reading Analog Input: Values from the Resistor Codes 351 Potentiometer 259 Analog Values as Output: PWM 266 Identifying Resistors by Color Bands 351 vi acknowLedgments This book wouldn’t have been possible without the help of many people, more than we can mention here. We’d like to thank our tech editor, Anna Pinkas, for her tireless and thorough review of this text. An earlier version of this book also benefited from tech editing by Michael Colombo and Sharon Cichelli. Roger Stewart, our publisher and editor, has been supportive and helpful throughout the process of getting this book into print. Our production team from Happen- stance Type-O-Rama has been a delight to work with, particularly Liz Welch and Maureen Forys. We met at the Interactive Telecom- munications Program at New York University, and we will always be grateful to Tom Igoe for suggesting we work together on a project there. In fact, we’d like to thank all of the faculty and staff at ITP, especially Dan O’Sullivan and Marianne Petit. Eric would like to thank his wife Marie for her endless support, without which this book would not be possible. He would also like to thank his parents, David and Tracey, who have always had so much faith in his work. Jody would like to thank her husband Calvin Reid, who seems to think she can do anything and has done whatever he can to make that possible. And she would like to acknowledge the memory of her parents, Florence and Hosmer Culkin, who would be startled but proud that she has co-authored a book on technology. vii about thE authors Jody Culkin is an artist and teacher. She has shown her sculptures, photographs, and installations at museums and galleries through- out this country and internationally. She illustrated How to Use a Breadboard, written by Sean Ragan, for Maker Media (2017). Her comic Arduino! has been translated into 12 languages. She has received grants and awards from the National Science Foundation, the New York State Council on the Arts, and many other organiza- tions. She is currently a professor at City University of New York's Borough of Manhattan Community College in the Media Arts and Technology Department. She has a BA from Harvard University in visual studies and an MPS from NYU's Interactive Telecommunica- tions Program. Eric Hagan is an interactive and kinetic artist and professor based out of Astoria, New York. He has written articles for publications, including Make: magazine and Popular Science. He has also worked on several art installation projects around New York City, includ- ing the annual holiday windows on 5th Avenue and Kara Walker’s A Subtlety. He is currently an assistant professor at SUNY Old Westbury in the Visual Arts Department. He has a BA from Duke University in philosophy and an MPS from NYU's Interactive Tele- communications Program. Eric enjoys showing projects at the annual New York City World Maker Faire. viii

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.