30 Arduino Projects for the Evil Genius

30 Arduino Projects for the Evil Genius
اسم المؤلف
Simon Monk
التاريخ
المشاهدات
163
التقييم
(لا توجد تقييمات)
Loading...
التحميل

30 Arduino Projects for the Evil Genius
Simon Monk
Contents
Acknowledgments ix
Introduction . xi
1 Quickstart 1
Powering Up 1
Installing the Software . 1
Configuring Your Arduino Environment . 6
Downloading the Project Software . 6
Project 1 Flashing LED . 8
Breadboard 11
Summary . 13
2 A Tour of Arduino . 15
Microcontrollers 15
What’s on an Arduino Board? . 15
The Arduino Family . 20
The C Language 21
Summary . 25
3 LED Projects 27
Project 2 Morse Code S.O.S. Flasher 27
Loops 29
Arrays 30
Project 3 Morse Code Translator 31
Project 4 High-Brightness Morse Code Translator 35
Summary . 40
4 More LED Projects . 41
Digital Inputs and Outputs 41
Project 5 Model Traffic Signal . 41
Project 6 Strobe Light 44
Project 7 S.A.D. Light 47
Project 8 High-Powered Strobe Light 52
Random Number Generation 55
Project 9 LED Dice 55
Summary . 59
5 Sensor Projects . 61
Project 10 Keypad Security Code . 61
Rotary Encoders 67
Project 11 Model Traffic Signal Using a Rotary Encoder 68
Sensing Light 72
Project 12 Pulse Rate Monitor 73Measuring Temperature 77
Project 13 USB Temperature Logger 77
Summary . 83
6 Light Projects . 85
Project 14 Multicolor Light Display . 85
Seven-Segment LEDs . 89
Project 15 Seven-Segment LED Double Dice 91
Project 16 LED Array 95
LCD Displays . 101
Project 17 USB Message Board 102
Summary . 105
7 Sound Projects 107
Project 18 Oscilloscope . 107
Sound Generation 111
Project 19 Tune Player 112
Project 20 Light Harp 117
Project 21 VU Meter . 120
Summary . 124
8 Power Projects 125
Project 22 LCD Thermostat 125
Project 23 Computer-Controlled Fan . 132
H-Bridge Controllers 134
Project 24 Hypnotizer 134
Servo Motors 138
Project 25 Servo-Controlled Laser 138
Summary . 142
9 Miscellaneous Projects . 145
Project 26 Lie Detector . 145
Project 27 Magnetic Door Lock 148
Project 28 Infrared Remote 153
Project 29 Lilypad Clock 159
Project 30 Evil Genius Countdown Timer . 163
Summary . 168
10 Your Projects . 169
Circuits . 169
Components . 171
Tools . 175
Project Ideas . 179
Appendix Components and Supplies 181
Suppliers . 181
Starter Kit of Components 185
Index 187
viii 30 Arduino Projects for the Evil Genius
Index
References to figures are in italics.
! command, 123
A
allOff function, 138
amplification, 36
analog inputs, 18
analog meters, 177
analog output from digital inputs, 112
Arduino Diecimila board
powering up, 1
selecting, 6, 7
suppliers, 182
Arduino Duemilanove board, 2
powering up, 1
selecting, 6, 7
suppliers, 182
Arduino Lilypad, 20
suppliers, 182
Arduino Mega, 20
Arduino Playground, 179
Arduino Protoshield, 37, 38–40
arrays, 30–32
ATmega168, 20
ATmega328, 19–20
autoranging meters, 177
B
back EMF, 126, 150
bipolar transistors, 90–91
Blink program, 1
modifying, 8–11
board components, 16
analog inputs, 18
digital connections, 18–19
microcontrollers, 19–20
oscillator, 20
power connections, 16–18
power supply, 16
Reset switch, 20
serial programming connector, 20
USB interface chip, 20
breadboards, 11–13
Brevig, Alexander, 64
buying components, 175
C
C language, 21
arithmetic, 23–24
arrays, 30–32
bumpy case, 21–22
conditional statements, 24–25
constants, 23
data types, 23, 24
example, 21–23
functions, 22
integers, 22
logical expressions, 25
logical operators, 25
loops, 23, 29–30
parameters, 23
semicolon, 22
Strings, 24
variables, 22, 23
capacitors, 108
suppliers, 182
circuits
circuit symbols, 171
schematic diagrams, 169–171
clones, 182
code, 8
187collector-feedback bias, 121
common anodes, 91–92
component box, 175
components
buying, 175
starter kit, 185
suppliers, 181–184
computer-controlled fan (Project 23), 132–133
conditional statements, 24–25
configuring the Arduino environment, 6, 7
constants, 23
continuity test, 178–179
countdown timer (Project 30), 163–168
current, measuring, 178
D
DAC, 111
data types, 23, 24
datasheets, 171
decade counter, 96
dice, 55–59, 91–95
Diecimila. See Arduino Diecimila board
digital connections, 18–19
digital inputs and outputs, 41
analog output from digital inputs, 112
digital meters, 177
digital-to-analog converters, 111
disk images, 5
downloading project software, 6–8
Duemilanove. See Arduino Duemilanove board
E
EEPROM, 20, 78, 82, 153
electromotive force, 126
EMF, 126
EPROM, 15
Evil Genius countdown timer (Project 30),
163–168
Extraction Wizard, 2–3
F
FETs, 48, 96
MOSFETs, 135–136
field effect transistors, 48, 96
flashing LED (Project 1), 8–11
Flashing LED (Project 1), breadboard, 12
Found New Hardware Wizard, 3, 4
functions, 22
G
getEncoderTurn function, 69
GND, 17
lines in schematic diagrams, 169
H
H-bridge controllers, 134
high-brightness Morse code translator (Project 4),
35–38
making a shield for, 38–40
high-powered strobe light (Project 8), 52–55
hunting, 127–130
hypnotizer (Project 24), 134–138
hysteresis, 130
I
ideas for projects, 179–180
infrared remote (Project 28), 153–158
inputs, 15
analog, 18
digital, 41
installing software, 1–2
on LINUX, 5–6
on Mac OS X, 4–5
on Windows, 2–4
integers, 22
K
keypad security code (Project 10), 61–67
L
lasers, servo-controlled laser (Project 25),
138–143
LCD displays, 101–102
LCD thermostat (Project 22), 125–131
LDRs, 72
leaky integration, 75
LED array (Project 16), 95–101
LED dice (Project 9), 55–59
ledPin, 21, 22
LEDs
1W Luxeon, 35
adding an external LED, 10–11
188 30 Arduino Projects for the Evil Geniusflashing LED (Project 1), 8–11
high-brightness Morse code translator (Project 4),
35–40
high-powered strobe light (Project 8), 52–55
LED array (Project 16), 95–101
LED dice (Project 9), 55–59
model traffic signal (Project 5), 41–44
Morse code S.O.S. flasher (Project 2), 27–31
Morse code translator (Project 3), 31–35
S.A.D. light (Project 7), 47–52
seven-segment LED double dice (Project 15),
91–95
seven-segment LEDs, 89–91
strobe light (Project 6), 44–47
libraries, installing into Arduino software, 64, 65,
154–155, 161
lie detector (Project 26), 145–148
light harp (Project 20), 117–120
light-dependent resistors, 72
lights
LED array (Project 16), 95–101
multicolor light display (Project 14), 85–89
seven-segment LED double dice (Project 15),
91–95
strobe light (high-powered—Project 8), 52–55
strobe light (Project 6), 44–46
USB message board (Project 17), 102–105
Lilypad. See Arduino Lilypad
Lilypad clock (Project 29), 159–162
LINUX, installing software on, 5–6
logical expressions, 25
logical operators, 25
loops, 23, 29–30
M
Mac OS X, installing software on, 4–5
magnetic door lock (Project 27), 148–153
mains electricity, 110, 125
mains hum, 110
marketing operator, 123
measuring current, 178
measuring resistance, 179
measuring temperature, 77
measuring voltage, 177–178
memory, 15, 19–20
message board, 102–105
metal oxide semiconductor field effect transistors,
135–136
microcontrollers, 15, 19–20
model traffic signal (Project 5), 41–44
model traffic signal using a rotary encoder
(Project 11), 68–72
modules, 174–175
Morse code letters, 32
Morse code S.O.S. flasher (Project 2), 27–29
Morse code translator (high-brightness—Project 4),
35–38
making a shield for, 38–40
Morse code translator (Project 3), 31–35
MOSFETs, 135–136
multicolor light display (Project 14), 85–89
multimeter, 177–179
O
Ohm’s Law, 17–18
OmniGraffle, 171
operators, 25
marketing operator, 123
oscillator, 20
oscilloscope (Project 18), 107–111
oscilloscopes, 179
outputs, 15
analog output from digital inputs, 112
digital, 41
P
parameters, 23
PCBs. See Protoshield circuit boards
perf board, 48
layout, 50
photoresistors, 72
phototransistors, 72, 73–74
piezobuzzers, 146–147
playNote function, 113–116
pliers, 176
PNP transistors, 92
power
computer-controlled fan (Project 23), 132–133
hypnotizer (Project 24), 134–138
LCD thermostat (Project 22), 125–131
servo-controlled laser (Project 25), 138–143
power connections, 16–18
Index 189power jumper, 1
power supply, 16
pre-processor directives, 78
programs, 8
projects
computer-controlled fan, 132–133
Evil Genius countdown timer, 163–168
flashing LED, 8–11
high-brightness Morse code translator, 35–38
high-powered strobe light, 52–55
hypnotizer, 134–138
ideas, 179–180
infrared remote, 153–158
keypad security code, 61–67
LCD thermostat, 125–131
LED array, 95–101
LED dice, 55–59
lie detector, 145–148
light harp, 117–120
Lilypad clock, 159–162
magnetic door lock, 148–153
model traffic signal, 41–44
model traffic signal using a rotary encoder,
68–72
Morse code S.O.S. flasher, 27–29
Morse code translator, 31–35
multicolor light display, 85–89
oscilloscope, 107–111
pulse rate monitor, 73–77
S.A.D. light, 47–52
servo-controlled laser, 138–143
seven-segment LED double dice, 91–95
strobe light, 44–47
tune player, 112–116
USB message board, 102–105
USB temperature logger, 77–83
VU meter, 120–124
Protoshield circuit boards, 39
pulse rate monitor (Project 12), 73–77
Pulse Width Modulation, 48
PWM, 48
R
R-2R resistor ladder, 111, 112
RAM, 15
random function, 55
random number generation, 55
randomSeed function, 55
reed switches, 159
Reset button, 1
Reset connector, 16–17
Reset switch, 20
resistance measurement, 179
resistors, 10, 172
color codes, 172
light-dependent resistors, 72
suppliers, 182
values, 19
variable resistors, 45, 46, 47, 147
rotary encoders, 67, 68
Ruby language, installing, 109–110
S
S.A.D. light (Project 7), 47–52
schematic diagrams, 169–171
See also individual projects
semiconductors, suppliers, 183
sensors
keypad security code (Project 10), 61–67
model traffic signal using a rotary encoder
(Project 11), 68–72
pulse rate monitor (Project 12), 73–77
USB temperature logger (Project 13), 77–83
Serial Monitor, 34–35, 75
serial port, settings, 6, 7
serial programming connector, 20
servo motors, 138
servo-controlled laser (Project 25), 138–143
seven-segment LED double dice (Project 15), 91–95
seven-segment LEDs, 89–91
See also LEDs
shields, 38–40, 47, 142, 174–175
Shirriff, Ken, 154
sine waves, 111
sketches, 8
snips, 176
software
Blink sketch, 8–9
downloading project software, 6–8
installing, 3–6
soldering, 176–177
solenoid, 148–150, 153
190 30 Arduino Projects for the Evil Geniussound
generation, 111–112
light harp (Project 20), 117–120
oscilloscope (Project 18), 107–111
tune player (Project 19), 112–116
VU meter (Project 21), 120–124
square waves, 111
Stanley, Mark, 64
starter kit of components, 185
Strings, 24
strobe light (high-powered—Project 8), 52–55
strobe light (Project 6), 44–46
making a shield for, 47
suppliers, 181–184
T
temperature
LCD thermostat, 125–131
measuring, 77
temperature logger, 77–83
Theremin, 117
thermistors, 77
USB temperature logger (Project 13),
77–83
thermostat, 125–131
timer, 163–168
tools, 175
component box, 175
multimeter, 177–179
oscilloscopes, 179
snips and pliers, 176
soldering, 176–177
transistors, 173–174
bipolar transistors, 90–91
datasheet, 174
FETs, 48, 96
MOSFETs, 135–136
NPN bipolar transistor, 36
PNP transistors, 92
used in this book, 173
Transistor-Transistor Logic, 16
TTL, 16
tune player (Project 19), 112–116
U
updates, 3
USB drivers, installing, 3–4
USB interface chip, 20
USB lead, type A-to-type B, 1
USB message board (Project 17), 102–105
USB temperature logger (Project 13), 77–83
V
variable resistors, 45, 46, 47, 147
variables, 22, 23
voltage, measuring, 177–178
voltage regulator, 16
VU meter (Project 21), 120–124
W
web color chart, 87
website, 2
Windows, installing software on, 2–4
wire stripper, 176

كلمة سر فك الضغط : books-world.net
The Unzip Password : books-world.net

تحميل

يجب عليك التسجيل في الموقع لكي تتمكن من التحميل

تسجيل | تسجيل الدخول