make_getting_started_with_arduino_3rd_edition.pdf

(26795 KB) Pobierz
Make:
nce
20
Si
09
3rd Edition
Getting
Started with
Arduino
es
B
t
s
e
ll
e
r
JA’C
The Open Source Electronics
Prototyping Platform
Massimo Banzi
co-founder of Arduino
& Michael Shiloh
Hardware/Programming
Make:
Getting Started
with Arduino
3rd Edition
Arduino is the open source electronics prototyping platform that
has taken the Maker Movement by storm. This thorough
introduction, updated for the latest Arduino release, helps you
start prototyping right away. From obtaining the required
components to putting the final touches on your project, all the
information you need is here!
Getting started with Arduino is a snap. To use the introductory
examples in this guide, all you need is an Arduino Uno or
Leonardo, along with a USB cable and an LED. The easy-to-use,
free Arduino development environment runs on Mac, Windows,
and Linux.
Join hundreds of thousands of hobbyists who have discovered
this incredible (and educational) platform.
In
Getting Started with Arduino,
you’ll learn about:
»
»
»
»
»
»
»
Interaction design and physical computing
The Arduino board and its software environment
Basics of electricity and electronics
Prototyping on a solderless breadboard
Drawing a schematic diagram
Talking to a computer—and the cloud—from Arduino
Building a custom plant-watering system
Written by Massimo Banzi, the co-founder of Arduino
and Michael Shiloh, Arduino’s educational lead.
US $19.99 CAN $20.99
ISBN: 978-1-4493-6333-8
Make:
makezine.com
THIRD EDITION
Getting
Started with
Arduino
Massimo Banzi and
Michael Shiloh
Getting Started with Arduino
by Massimo Banzi and Michael Shiloh
Copyright © 2015 Massimo Banzi and Michael Shiloh. All rights reserved.
Printed in the United States of America.
Published by Maker Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA
95472.
Maker Media books may be purchased for educational, business, or sales promo-
tional use. Online editions are also available for most titles (http:/
/www.safaribook-
sonline.com).
For more information, contact our corporate/institutional sales depart-
ment: 800-998-9938 or
corporate@oreilly.com.
Editor:
Brian Jepson
Production Editor:
Nicole Shelby
Copyeditor:
Kim Cofer
Proofreader:
Sharon Wilkey
Indexer:
WordCo Indexing Services
Interior Designer:
David Futato
Cover Designer:
Brian Jepson
Illustrator:
Judy Aime’ Castro
December 2014:
Third Edition
Revision History for the Third Edition
2014-12-09: First Release
2014-12-19: Second Release
See
http:/
/oreilly.com/catalog/errata.csp?isbn=9781449363338
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.
Getting Started with Ardu-
ino
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 every precaution has been taken in the preparation of this book, the publisher
and authors assume no responsibility for errors or omissions, or for damages result-
ing from the use of the information contained herein.
978-1-449-36333-8
[LSI]
Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1/Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Intended Audience.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
What Is Interaction Design?.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
What Is Physical Computing?.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
2/The Arduino Way. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Prototyping.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Tinkering.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Patching.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Circuit Bending.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Keyboard Hacks.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
We Love Junk!.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Hacking Toys.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Collaboration.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3/The Arduino Platform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The Arduino Hardware.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The Software Integrated Development Environment (IDE).
. . . . . . . . . . . . . . . 18
Installing Arduino on Your Computer.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Installing the IDE: Macintosh.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Configuring the Drivers: Macintosh.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Port Identification: Macintosh.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Installing the IDE: Windows.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Configuring the Drivers: Windows.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Port Identification: Windows.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4/Really Getting Started with Arduino. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Anatomy of an Interactive Device.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Sensors and Actuators.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Blinking an LED.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Pass Me the Parmesan.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
iii
Zgłoś jeśli naruszono regulamin