Table of Contents
Acknowledgments xix
Introduction xx
The Arduino Revolution xxi
About This Book xxii
Organization of This Book xxiii
Project 0 Getting Started 2
Hardware 3
The Arduino UNO 3
Power 3
Breadboards 4
Jumper Wires 5
Programming the Arduino 6
The IDE Interface 6
Arduino Sketches 7
Libraries 7
Testing Your Arduino: Blinking An Led 9
Understanding the Sketch 10
Project Component List 11
Setting Up Your Workspace 13
Equipment and Tool Guide 15
Quick Soldering Guide 18
Safety First 20
Part 1 Leds
Project 1 Pushbutton-controlled Led 22
How It Works 24
The Build 25
The Sketch 27
Project 2 Light Dimmer 28
How It Works 30
The Build 31
The Sketch 33
Project 3 Bar Graph 34
How St Works 36
The Build 37
The Sketch 38
Project 4 Disco Strobe Light 39
How It Works 41
The Build 41
The Sketch 43
Project 5 Plant Monitor 45
How It Works 47
The Build 48
The Sketch 51
Project 6 Ghost Detector 53
How It Works 55
The Build 55
The Sketch 59
Part 2 Sound
Project 7 Arduino Melody 64
How It Works 66
The Build 67
The Sketch 67
Project 8 Memory Game 69
How It Works 71
The Build 71
The Sketch 73
Project 9 Secret Knock Lock 78
How It Works 80
The Build 81
The Sketch 82
Part 3 Seervos
Project 10 Joystick-Controlled Laser 86
How It Works 88
The Build 89
Mounting the Laser 90
The Sketch 92
Project 11 Remote Control Servo 93
How It Works 95
The Setup 96
The Build 97
The Sketch 99
Part 4 LCDs
Project 12 LCD Screen Writer 102
How It Works 104
Preparing the LCD Screen 104
The Build 105
The Sketch 107
How It Works 112
The Build 112
The Sketch 116
Project 14 Fortune Teller
How It Works 119
The Build 119
The Sketch 122
Project 15 Reaction Timer Game 124
How It Works 126
The Build 127
The Sketch 130
Part 5 Numeric Counters
Project 16 Electronic DIE 134
How It Works 136
The Build 137
The Sketch 140
Project 17 Rocket Launcher 143
How It Works 145
The Build 145
Create a Working Fuse 149
The Sketch 151
Part 6 Security
Project 18 Intruder Sensor 156
How It Works 158
The Build 158
The Sketch 161
Project 19 Laser trip Wire Alarm 163
How It Works 165
The Build 165
The Sketch 168
Project 20 Sentry Gun 170
How It Works 172
The Build 173
The Sketch 176
Project 21 Motion Sensor Alarm 178
How It Works 180
The Build 181
The Sketch 183
Project 22 Keypad Entry System 185
How It Works 187
Testing the Keypad 187
The Build 189
The Sketch 192
Project 23 Wireless ID Card Entry System 194
How It Works 196
The Build 198
The Sketch 203
Part 7 Advanced
Project 24 Rainbow Light Show 208
How It Works 210
The Build 212
The Sketch 215
Project 25 Build Your Own Arduino! 220
How It Works 222
Preparing the Chip 223
Building the Arduino Circuit 224
Appendix A Components 229
Components Guide 230
Arduino UNO R3 230
9V Battery Pack 230
Breadboard 230
Led 231
Resistor 231
Pushbutton 231
Potentiometer 232
HL-69 Soil Sensor 232
Piezo Buzzer 232
Servomotor 233
Joystick 233
Infrared Led Receiver 233
LCD Screen 234
DHT11 Humidity Sensor 234
Tilt Ball Switch 234
RGB Led 235
Seven-Segment Led Display 235
Four-Digit, Seven-Segment Serial Display 235
Ultrasonic Sensor 236
Photoresistor 236
RC V959 Missile Launcher 236
PIR Sensor 237
Keypad 237
RFID Reader 237
RGB Matrix 238
Shift Register 238
Atmega328P Chip 238
16 MHZ Crystal Oscillator 239
5V Regulator 239
Capacitor 239
Disc Capacitor 240
Battery Clip 240
Retailer List 240
Decoding Resistor Values 241
Appendix B Arduino Pin Reference 243