make_basic_arduino_projects.pdf

(116151 KB) Pobierz
Make:
BASIC
Get ke:
t
Sta ing
rted
wit
hA
r du
ino
panio
om
Ma
n
C
the
to
Arduino
Projects
26 Experiments with
Microcontrollers and Electronics
De
lu
x
e
Kit
Don Wilcher
Technology & Engineering / Electronics
Basic Arduino Projects
Written for new makers,
Basic Arduino Projects
is a practical guide
containing 26 projects that you can start on immediately. Learn to
build electronic circuits that change their behavior, a light-sensitive
switch, and LED projects like the pocket stage light. You’ll learn
how to control servo motors (the building blocks of robots) and to
create audio projects like a theremin, electronic cricket, and
metronome. The only restriction is your imagination.
This book is the perfect companion to the Make: Getting Started
with Arduino-Deluxe Kit which contains 100+ pieces—from the
basics, like the Arduino board, breadboards, resistors, capacitors
LEDs, and jumper wires, to the fun stuff like servos, switches,
sensors, buttons, motors, LCD screen—and more! The kit will
jump-start your projects!
By building and experimenting with the 26 projects
outlined in this book, you will learn how to:
»
Use the Arduino as a programmable computer brain
»
Create electronic controllers for LEDs and servo motors
»
Draw colors on your computer screen by pushing a button
»
Detect changes in temperature and notify your computer
»
Use an LCD display to show text and special characters
»
Control a motor’s movements with a tilt sensor
»
Build four projects that combine Arduino with the Processing
visual programming language
»
Make your own ohmmeter and logic testers
Start making today.
US $19.99 CAN $20.99
ISBN: 978-1-4493-6066-5
Make:
makezine.com
Make: Basic
Arduino
Projects
26 Experiments with Microcontrollers
and Electronics
Don Wilcher
Make: Basic Arduino Projects
by Don Wilcher
Copyright © 2014 Don Wilcher. 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 promotional use.
Online editions are also available for most titles (http://safaribooksonline.com). For more in-
formation, contact O’Reilly Media’s corporate/institutional sales department:
800-998-9938 or
corporate@oreilly.com.
Editor:
Patrick Di Justo
Production Editor:
Kara Ebrahim
Copyeditor:
Charles Roumeliotis
Proofreader:
Jasmine Kwityn
Indexer:
Ellen Troutman
Cover Designer:
Juliann Brown
Interior Designer:
David Futato
Illustrator:
Rebecca Demarest
Photographers:
Frank Teng and Don Wilcher
February 2014:
First Edition
Revision History for the First Edition:
2014-02-05:
2014-03-07:
2015-10-23:
First release
Second release
Third release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449360665
for release details.
The Make logo and Maker Media logo are registered trademarks of Maker Media, Inc.
Make:
Basic Arduino Projects
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
author assume no responsibility for errors or omissions, or for damages resulting from the
use of the information contained herein.
ISBN: 978-1-449-36066-5
[LSI]
Contents
Preface.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1.
The Trick Switch.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Parts List.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Let’s Build a Trick Switch.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Trick Switch with On/Off Indicators.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Something to Think About.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.
Sunrise-Sunset Light Switch.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Parts List.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Let’s Build a Sunrise-Sunset Light Switch.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Circuit Theory.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Sunrise-Sunset Detector with Serial Monitor.
. . . . . . . . . . . . . . . . . . . . . . . . 14
Something to Think About.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.
Tilt Sensing Servo Motor Controller.
. . . . . . . . . . . . . . . . . . . . . . . . . 19
Parts List.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Let’s Build a Tilt Sensing Servo Motor Controller.
. . . . . . . . . . . . . . . . . . . . . 20
Upload the Tilt Sensor Sketch.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
A Simple Animatronic Controller Using the Serial Monitor.
. . . . . . . . . . . . 24
Circuit Theory.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Something to Think About.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.
Twin LEDs.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Parts List.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Circuit Theory.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
iii
Zgłoś jeśli naruszono regulamin