Arduino Inventor's Guide, The.pdf

(15763 KB) Pobierz
Contents in Detail
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Cover Page
Title Page
Copyright Page
About Sparkfun Electronics
About the Authors
About the Technical Reviewer
A Note from Brian
A Note from Derek
Contents
Contents in Detail
Introduction
1.
What is this Book About?
2.
Why Arduino?
3.
How is this Book Different from Others?
4.
Materials
5.
Required Tools
6.
Required Computer
7.
What’s in this Book?
8.
Online Resources
9.
Spread the Word: Sharing Your Work
12.
Electronics Primer
1.
Electricity, Conductivity, and Basic Terms
1.
What Is Electricity?
2.
Types of Electricity
3.
What Is a Circuit?
4.
Ohm’s Law
5.
Visualizing Electricity as Water in a Pipe
2.
Schematics, Circuit Blueprints, and Wiring Diagrams
3.
Prototyping Circuits
4.
Discrete Components vs. Breakout Boards
5.
Analog vs. Digital
6.
What Is A Microcontroller?
13.
Project 1: Getting Started with Arduino
1.
Materials to Gather
2.
About the Arduino
1.
An Accessible Hardware Platform
2.
About the SparkFun RedBoard
3.
Installing the Arduino IDE and Drivers
1.
Installing on Windows
2.
Installing on OS X
3.
Installing on Linux
4.
A Brief IDE Tour
5.
Changing the Default Preferences
6.
Test Drive: Plugging in the Arduino for the First Time
1.
Choosing Your Board in the IDE
2.
Selecting the Communication Port
7.
An Arduino “Hello, World!”
8.
Basic Arduino Troubleshooting
9.
Anatomy of an Arduino Sketch
1.
Key Sketch Elements
2.
The setup() Function
3.
The loop() Function
4.
Your First Piece of Hardware
10.
Going Further
1.
Hack
2.
Modify
11.
Saving Your Sketch
14.
Project 2: A Stoplight for Your House
1.
Materials to Gather
1.
Electronic Parts
2.
Other Materials and Tools
2.
New Component: The Resistor
3.
Build the Stoplight Prototype
1.
Connect the Red LED to the Breadboard
2.
Add Power to the Breadboard
3.
Add the Yellow and Green LEDs
4.
Program the Stoplight
1.
Confirm Your IDE Settings
2.
Create Placeholders for Pin Numbers
3.
Write the setup() Function
4.
Write the loop() Function
5.
Upload the Sketch
6.
Make the Stoplight Portable
5.
Build the Stoplight Enclosure
1.
Cardboard Construction
2.
Make the Stoplight Lenses
3.
Make the Shades
4.
Mount the LEDs and Arduino
6.
Going Further
1.
Hack
2.
Modify
15.
Project 3: The Nine-Pixel Animation Machine
1.
Materials to Gather
1.
Electronic Parts
2.
Other Materials and Tools
2.
Build the Nine-Pixel Animation Machine Prototype
3.
Program the Nine-Pixel Animation Machine
1.
What Are Custom Functions?
2.
Design Your Artwork
3.
The Test Sketch
4.
Build the Nine-Pixel Animation Machine Enclosure
1.
Cardboard Construction
2.
Connect the Electronics
5.
Create an Led Animation
1.
Plan the Animation Sequence
2.
Write Custom Functions
3.
Tweak Your loop() Function
6.
Going Further
1.
Hack
2.
Modify
16.
Project 4: Reaction Timer
1.
Materials to Gather
1.
Electronic Parts
2.
Other Materials and Tools
2.
New Component: The Push Button
1.
How Push Buttons Work
2.
Using Resistors with Push Buttons
3.
Build the Reaction Timer Prototype
4.
Program the Reaction Timer
1.
Write the setup() Function
2.
Write the loop() Function
3.
Test the Reaction Timer Sketch
4.
Play Again?
5.
Add a Game Element
6.
Upload the Complete Code for the Reaction Timer
5.
Build the Reaction Timer Enclosure
1.
Cut Out the Cardboard
2.
Assemble the Electronics
3.
Spice Up Your Game Enclosure
6.
Going Further
1.
Hack
2.
Modify
17.
Project 5: A Color-Mixing Night-Light
1.
Materials to Gather
1.
Electronic Parts
2.
Other Materials and Tools
2.
New Components
1.
The RGB LED
2.
The Photoresistor
3.
Build the Night-Light Prototype
1.
Wire the Voltage Divider
2.
Wire the RGB LED
4.
Test the Night-Light with Basic Color Mixing
5.
Program the Night-Light
1.
Prepare to Check the Light Level
2.
Control the Night-Light Based on the Light Level
3.
Prevent False Alarms
4.
Recalibrate the Night-Light
6.
Create More Colors with Analogwrite()
1.
Create Analog Signals with PWM
2.
Mix Colors with analogWrite()
3.
Find RGB Values with Color Picker
4.
The Custom-Color Night-Light Code
7.
Build the Night-Light Enclosure
1.
Cardstock Construction
2.
Put the Electronics Inside
3.
Let It Glow!
8.
Going Further
1.
Hack
2.
Modify
18.
Project 6: Balance Beam
1.
Materials to Gather
1.
Electronic Parts
2.
Other Materials and Tools
2.
New Components
1.
The Potentiometer
2.
The Servo Motor
3.
Build the Balance Beam Prototype
4.
Program the Balance Beam
1.
Test the Servo
2.
Complete the Balance Beam Sketch
5.
Build the Balance Beam
1.
Cut Out the Parts
2.
Build the Beam
3.
Build the Base and Attach the Servo
4.
Final Assembly
6.
Going Further
1.
Hack
2.
Modify
19.
Project 7: Tiny Desktop Greenhouse
1.
Materials to Gather
1.
Electronic Parts
2.
Other Materials and Tools
2.
New Components
1.
TMP36 Temperature Sensor
2.
Standard Hobby Motor
3.
NPN Transistor
3.
Taking a Systems Approach
4.
Build the Temperature Monitor
1.
Measure Temperature with the TMP36
2.
Connect the Temperature Sensor
Zgłoś jeśli naruszono regulamin