Getting Started with Arduino 1st Edition By Massimo Banzi, ARDUINO, Arduino Projects and Tutorials Ebook Collection

[ Pobierz całość w formacie PDF ]
Getting
Started
with
Arduino
Massimo Banzi
First Edition
Getting Started with Arduino
by Massimo Banzi
Copyright © 2009 Massimo Banzi. All rights reserved.
Printed in U.S.A.
Published by Make:Books, an imprint of Maker Media,
a division of O’Reilly Media, Inc.
1005 Gravenstein Highway North, Sebastopol, CA 95472
O’Reilly books may be purchased for educational, business,
or sales promotional use. For more information, contact our
corporate/institutional sales department: 800-998-9938
or
Print History:
October 2008: First Edition
Publisher:
Dale Dougherty
Associate Publisher:
Dan Woods
Executive Editor:
Brian Jepson
Creative Director:
Daniel Carter
Designer:
Brian Scott
Production Manager:
Terry Bronson
Copy Editor:
Nancy Kotary
Indexer:
Patti Schiendelman
Illustrations:
Elisa Canducci
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
The Make: Projects series designations and related trade dress
are trademarks of O’Reilly Media, Inc. The trademarks of third
parties used in this work are the property of their respective
owners.
Important Message to Our Readers: Your safety is your own
responsibility, including proper use of equipment and safety gear,
and determining whether you have adequate skill and experi-
ence. Electricity and other resources used for these projects are
dangerous unless used properly and with adequate precautions,
including safety gear. Some illustrative photos do not depict
safety precautions or equipment, in order to show the project
steps more clearly. These projects are not intended for use by
children.
Use of the instructions and suggestions in
Getting Started with
Arduino
is at your own risk. O’Reilly Media, Inc. and the author
disclaim all responsibility for any resulting damage, injury, or
expense. It is your responsibility to make sure that your activities
comply with applicable laws, including copyright.
ISBN: 978-0-596-15551-3
[1/10]
Contents
Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
What Is Physical Computing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Tinkering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Patching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Circuit Bending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Keyboard Hacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
We Love Junk! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Hacking Toys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Collaboration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
The Arduino Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
The Software (IDE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Installing Arduino on Your Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Installing Drivers: Macintosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Installing Drivers: Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Port Identiication: Macintosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Port Identiication: Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Sensors and Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Blinking an LED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Pass Me the Parmesan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Arduino Is Not for Quitters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Real Tinkerers Write Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The Code, Step by Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
What We Will Be Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
What Is Electricity? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Using a Pushbutton to Control the LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
How Does This Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
One Circuit, A Thousand Behaviours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Trying Out Other On/Off Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Controlling Light with PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56
Use a Light Sensor Instead of a Pushbutton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
[ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • agus74.htw.pl