Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
125 views

Contents Arduino Uno - 45 Projects For Beginners and Experts

This document outlines 45 Arduino projects organized into 7 chapters, ranging from basic introductory projects like flashing an LED to more advanced projects involving sensors, motors, and networking. Each project includes a detailed explanation of the circuitry and code required.

Uploaded by

Milan Caran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views

Contents Arduino Uno - 45 Projects For Beginners and Experts

This document outlines 45 Arduino projects organized into 7 chapters, ranging from basic introductory projects like flashing an LED to more advanced projects involving sensors, motors, and networking. Each project includes a detailed explanation of the circuitry and code required.

Uploaded by

Milan Caran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Contents

Contents

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Chapter 1 • What is an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 2 • What you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.1 Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2 Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.3 Free software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.1 Free download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.2 Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.3 HyperTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3.4 PC Oscilloscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 3 • Tutorial project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Chapter 4 • The first steps (LED, switch, serial connection) . . . . . . . . . . . . . . . . . . . 23

4.1 Flashing LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.2 Alternating Flasher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.3 Serial counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.3.1 In the Arduino Serial Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.3.2 A nice screen lay-out on the PC without programming . . . . . . . . . . . . . . . . . . . 34

4.4 Serial debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4.4.1 The sketch doesn’t run correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4.4.2 The result is incorrect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.4.3 There is a problem involving multiple variables . . . . . . . . . . . . . . . . . . . . . . . . 38

4.5 We make our own ASCII table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4.6 Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

4.7 Timer with auto-restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

4.8 Alternating switch (flip-flop) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4.9 Die . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4.10 Secret doorbell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Chapter 5 • A/D conversion (var. resistor, LDR, voltages, PWM, sensors) . . . . . . . . . . 61

5.1 Flashing LED with adjustable speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

●7

45 Arduino Projects UK 160209.indd 7 18-02-16 15:16


Arduino Uno - 45 Projects for Beginners and Experts

5.2 Voltmeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

5.3 Nightlight (darkness switch) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

5.4 Photometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

5.5 Children’s bedroom light alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

5.6 Variable brightness LED (PWM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

5.7 Energy Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

5.8 Silent alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

5.9 Analyze a transistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

5.10 The plant needs watering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Chapter 6 • Measure, control and power (motors, sensors and sound) . . . . . . . . . . . . 97

6.0.1. Power over USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

6.0.2. An external power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

6.1 Control a motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

6.2 Variable speed electromotor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.3 Tachometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

6.4 Cruise control (constant speed with feedback) . . . . . . . . . . . . . . . . . . . . . . . . 117

6.5 Infrared object detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

6.6 Ultrasonic sensor (range finder) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

6.7 Tilt- or motion sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

6.8 Memory (data storage) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.1 EEPROM (permanent) memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8.2 Flash (program) memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

6.9 Switch alternating current with a relay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

6.10 Police siren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Chapter 7 • H
 ow crazy can you get
(AI, make your own Arduino, internet) . . . . . . . . . . . . . . . . . . . . . . . . 145

7.1 My favorite color (artificial intelligence, learning program) . . . . . . . . . . . . . . . . 145

7.2 People sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

7.3 Electric candle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

7.4 Fencing foil (or epée) tester . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

7.5 Knock knock who is there (knock sensor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

7.6 Night buzzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

●8

45 Arduino Projects UK 160209.indd 8 18-02-16 15:16


Contents

7.7 Tetris met 126 LEDs and Charlieplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.7.1 Charlieplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.7.2 Tetris game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

7.8 Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

7.8.1 Check a switch over the internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

7.8.2 Control an LED over the internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

7.8.3 Internet versus intranet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

7.9 Wireless control of a relay (radio-link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

7.10 Make your own Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

7.10.1 Stand-alone microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

7.10.2 With a USB connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

7.10.3 Demo project home-made Arduino: flashing LED with adjustable speed . . . . 205

Chapter 8 • Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.1 Adjustable power supply (1.2 to 13 volt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

8.2 The completed shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

●9

45 Arduino Projects UK 160209.indd 9 18-02-16 15:16

You might also like