1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

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

386 67 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 386
Dung lượng 49,97 MB

Nội dung

Tìm hiểu về Điện tử với Arduino

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 promotional use Online editions are also available for most titles (safaribooksonline.com) For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com Publisher and Editor: Roger Stewart Copy Editor: Elizabeth Welch, Happenstance Type-O-Rama Proofreader: Scout Festa, Happenstance Type-O-Rama Interior Designer, Compositor, and Cover Designer: Maureen Forys, Happenstance Type-O-Rama Indexer: Valerie Perry, Happenstance Type-O-Rama August 2017: First Edition Revision History for the First Edition 28-08-2017 First Release See oreilly.com/catalog/errata.csp?isbn=9781680453744 for release details Make:, Maker Shed, and Maker Faire are registered trademarks of Maker Media, Inc The Maker Media logo is a trademark of Maker Media, Inc An Illustrated Beginner’s Guide to Physical Computing and related trade dress are trademarks of Maker Media, Inc Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and Maker Media, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work Use of the information and instructions contained in this work is at your own risk If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights 9-781-68045-374-4 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 business 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 hundreds 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 books@makermedia.com Maker Media unites, inspires, informs, and entertains a growing community of resourceful people who undertake amazing projects in their backyards, basements, and garages Maker Media celebrates your right to tweak, hack, and bend any Technology to your will The Maker Media audience continues to be a growing culture and community that believes in bettering ourselves, our environment, our educational system—our entire world This is much more than an audience, it’s a worldwide movement that Maker Media is leading We call it the Maker Movement To learn more about Make: visit us at makezine.com You can learn more about the company at the following websites: Maker Media: makermedia.com Maker Faire: makerfaire.com Maker Shed: makershed.com Dedication Dedicated to all of our students, past, present, and future Their curiosity drives them and inspires us iv Contents Acknowledgments vii About the Authors viii Preface ix Introduction to Arduino Physical Computing Prototyping 3 What Will I Need and Where Can I Get It? Parts and Tools Resources 12 Summary 13 Your Arduino 15 Parts of an Arduino 16 Plug Your Arduino into Your Computer 20 Components and Tools 26 Summary 30 Meet the Circuit 31 The Circuit: Building Block of Electronics 32 The Schematic 37 Using a Breadboard 42 Building a Circuit 48 A Look at the Battery 52 Power for Our Circuit: Electricity 55 Debugging the Circuit 57 The Multimeter 60 Using the Multimeter 65 Back to Debugging Our Circuit 69 Summary 71 Programming the Arduino 73 Arduino, Circuits, and Code: Bringing Everything Together 74 What’s an IDE? 75 Downloading the Arduino IDE: Getting Started 78 The Sketch: The Basic Unit of Arduino Programming 90 Debugging: What to Do if the LED Isn’t Blinking 96 LEA4_Blink Sketch: An Overview 98 setup() and loop(): The Guts of Your Code 101 Looking at loop(): What Happens Over and Over 109 A Schematic of the Arduino 115 Building the Basic Circuit 118 SOS Signal Light: Creating More Complex Timing 125 Summary 135 Electricity and Metering 137 Understanding Electricity Build the Circuit Step by Step Electricity: An Overview Understanding Electricity: The Water Tank Analogy Voltage: The Potential Current: The Flow 138 140 144 148 149 159  v Resistance: Restricting the Flow 167 Voltage, Current, Resistance: Review 173 How Do Voltage, Current, and Resistance Interact? Ohm’s Law 177 Components in Parallel and Series 180 Summary 192 Switches, LEDs, and More 193 Interactivity! 194 Digital Inputs and Outputs Overview 195 Digital Input: Add a Button 197 Looking at the Sketch: Variables 206 Digital Input Refresher 213 Looking at the Sketch: Conditional Statements 215 Add a Speaker and Adjust the Code 220 Add Two More Buttons and Adjust the Code 227 Reviewing Electronic and Code Concepts 236 Summary 239 Analog Values 241 There’s More to Life than On and Off! 241 Potentiometer Circuit, Step by Step 246 The LEA7_AnalogInOutSerial Sketch 254 Analog Input: Values from the Potentiometer 259 Analog Values as Output: PWM 266 vi Serial Communication 269 Adding the Speaker 278 Adding the Photoresistor 282 Summary 288 Servo Motors 289 Waving the Flags 291 Servos Up Close 292 Building the Servo Circuit Step by Step 295 LEA8_Sweep Overview 301 What’s a for Loop? 304 Operators 309 The for Loop in the Sketch 312 Add Interactivity: Turn the Flag 314 LEA8_Knob Explained 317 Two Flags Waving: Add a Second Servo Motor 320 LEA8_2_servos, First Look 322 Summary 332 Building Your Projects 333 Project Management 334 A Few Helpful Components 338 Types of Projects 342 Other Versions of the Arduino Board 345 Document Your Project and Share It! 348 Summary 350 A Appendix: Reading Resistor Codes 351 Identifying Resistors by Color Bands 351 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 Happenstance Type-O-Rama has been a delight to work with, particularly Liz Welch and Maureen Forys We met at the Interactive Telecommunications 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 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 throughout 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 organizations 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 Telecommunications 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, including 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 Telecommunications Program Eric enjoys showing projects at the annual New York City World Maker Faire viii ... 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... different function Learn Electronics with Arduino Physical Computing The Arduino is used for building physical computing projects What does that mean? Physical computing refers to taking information... Arduino Physical Computing Prototyping 3 What Will I Need and Where Can I Get It? Parts and Tools Resources 12 Summary 13 Your Arduino 15 Parts of an Arduino 16 Plug Your Arduino into Your Computer 20

Ngày đăng: 04/12/2019, 10:09

TỪ KHÓA LIÊN QUAN