Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Getting Started with Arduino
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Preface
Acknowledgments
How to Contact Us
1. Introduction
Intended Audience
Interaction Design is the design of any interactive experience.
What Is Physical Computing?
2. The Arduino Way
Prototyping
Tinkering
Patching
Circuit Bending
Keyboard Hacks
We Love Junk!
Hacking Toys
Collaboration
3. The Arduino Platform
The Arduino Hardware
14 Digital IO pins (pins 0–13)
6 Analogue In pins (pins 0–5)
6 Analogue Out pins (pins 3, 5, 6, 9, 10, and 11)
The Software (IDE)
Installing Arduino on Your Computer
Installing Drivers: Macintosh
Installing Drivers: Windows
Port Identification: Macintosh
Port Identification: Windows
4. Really Getting Started with Arduino
Anatomy of an Interactive Device
Sensors and Actuators
Blinking an LED
Pass Me the Parmesan
Arduino Is Not for Quitters
Real Tinkerers Write Comments
The Code, Step by Step
What We Will Be Building
What Is Electricity?
Using a Pushbutton to Control the LED
How Does This Work?
One Circuit, A Thousand Behaviours
5. Advanced Input and Output
Trying Out Other On/Off Sensors
Switches
Thermostats
Magnetic switches (also known as "reed relays")
Carpet switches
Tilt switches
Controlling Light with PWM
Use a Light Sensor Instead of the Pushbutton
Analogue Input
Try Other Analogue Sensors
Serial Communication
Driving Bigger Loads (Motors, Lamps, and the Like)
Complex Sensors
6. Talking to the Cloud
Digital Output
Digital Output
Analog Output
Digital Input
Analog Input
Serial Communication
Planning
Coding
Assembling the Circuit
Here's How to Assemble It:
7. Troubleshooting
Understanding
Understanding
Simplification and segmentation
Exclusion and certainty
Testing the Board
Testing Your Breadboarded Circuit
Isolating Problems
Problems with the IDE
How to Get Help Online
A. The Breadboard
B. Reading Resistors and Capacitors
C. Arduino Quick Reference
STRUCTURE
SPECIAL SYMBOLS
; (semicolon)
{} (curly braces)
comments
CONSTANTS
VARIABLES
boolean
char
byte
int
unsigned int
long
unsigned long
float
double
string
array
CONTROL STRUCTURES
if … else
for
switch case
while
do … while
break
continue
return
ARITHMETIC AND FORMULAS
COMPARISON OPERATORS
BOOLEAN OPERATORS
COMPOUND OPERATORS
increment and decrement (–– and ++)
+= , –=, *= and /=
INPUT AND OUTPUT FUNCTIONS
pinMode(pin, mode)
digitalWrite(pin, value)
int digitalRead(pin)
int analogRead(pin)
analogWrite(pin, value)
shiftOut(dataPin, clockPin, bitOrder, value)
unsigned long pulseIn(pin, value)
TIME FUNCTIONS
unsigned long millis()
delay(ms)
delayMicroseconds(us)
MATH FUNCTIONS
min(x, y)
max(x, y)
abs(x)
constrain(x, a, b)
map(value, fromLow, fromHigh, toLow, toHigh)
double pow(base, exponent)
double sqrt(x)
double sin(rad)
double cos(rad)
double tan(rad)
RANDOM NUMBER FUNCTIONS
randomSeed(seed)
long random(max) long random(min, max)
SERIAL COMMUNICATION
Serial.begin(speed)
Serial.print(data) Serial.print(data, encoding)
Serial.println(data) Serial.println(data, encoding)
int Serial.available()
int Serial.read()
Serial.flush()
D. Reading Schematic Diagrams
Index
About the Author
SPECIAL OFFER: Upgrade this ebook with O’Reilly
← Prev
Back
Next →
← Prev
Back
Next →