May this book be a huge learning experience for you. Remember, you
can build a LOT of cool things with an Arduino, the examples in this manual
are just the beginning. Good luck and have fun!
Kit Contents Page 4 of 44
Solderless Breadboard
A 830-points protoboard used Tact Switch
for electronic circuit building.
This is the construction base for A 4-pin tactile electro-
1 pc prototyping electronics where 4 pcs mechanical switch used to
we place our components and close a circuit once pressed.
create temporary prototypes or
circuit design.
Buzzer
Light Emitting Diodes(LED)
1 piece each of an active and
15 pieces of assorted colored
15 LEDs that emits lights used to 2 pcs passive buzzer used as an
audio-signaling device. It
pcs indicate presence or absence of
creates sound once provided
electric current.
with electrical signal.
Kit Contents Page 5 of 44
Resistors
Battery Holder with Power
23 pieces each of 10k (5), 1k (5) Jack
and 220 (8) ohms resistor that
23 acts to reduce current flow and
1 pc
This is a 6x AA battery holder
pcs lower voltage levels within with power jack that hold
circuits. They help protect batteries.
electronic components.
Ball Switch
4-Digit Digital Tube
A tilt sensor that can detect
This is a basic 4-digit 2 pcs basic motion/orientation. The
1 pc 7-segment display. The display
metal tube that has a little metal
features one decimal point per
ball that rolls around it.
digit.
Kit Contents Page 6 of 44
Photoresistors
LM35 Temperature Sensor
Also called Light Dependent
Resistor (LDR) is a light- This device measures
3 pcs controlled variable resistor. The
1 pc
temperature with an electrical
resistance of it decreases with output proportional to the
increasing light intensity. It temperature.
exhibits photoconductivity.
A LED Matrix is a
display component used to
1 pc create patterns and messages
using an 8x8 LED display.
Remote Control
Arduino UNO is the best board to get started with electronics and coding. If this is your first
experience on programming with the platform, the UNO is the most robust board you can start
experimenting with. The UNO is the most used and documented board of the whole Arduino family.
Arduino Integrated Development Environment (IDE) Page 9 of 44
The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It
runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing
and other open-source software.
Programs written using Arduino Software (IDE) are The Arduino Software (IDE) uses the concept of a
called sketches. These sketches are written in the text sketchbook: a standard place to store your
editor and are saved with the file extension .ino. The editor programs (or sketches). The sketches in your
has features for cutting/pasting and for sketchbook can be opened from the File >
searching/replacing text. The message area gives Sketchbook menu or from the Open button on the
feedback while saving and exporting and also displays toolbar. The first time you run the Arduino software,
errors. The console displays text output by the Arduino it will automatically create a directory for your
Software (IDE), including complete error messages and sketchbook. You can view or change the location of
other information. The bottom right hand corner of the the sketchbook location from with
window displays the configured board and serial port. The the Preferences dialog.
toolbar buttons allow you to verify and upload programs,
create, open, and save sketches, and open the serial
monitor.
Arduino Integrated Development Environment (IDE) Page 10 of 44
Verify Open
Checks your code for errors before Presents a menu of all the sketches in
compiling it. your sketchbook.
Upload Save
New Save
6. GND and 5V pins- Use these pins to provide +5V power and
ground to your circuits.
7. Power connector- This is how you power your Genuino when it’s
not plugged into a USB port for power. Can accept voltages between
7-12V.
Here’s the anatomy of an Arduino Uno. 8. TX and RX These LEDs indicate communication between your
Genuino and your computerLEDs- . Expect them to flicker rapidly
1. Digital I/O pins -Use these pins with digitalRead(), during sketch upload as well as during serial communication. Useful
digitalWrite(), and analogWrite(). analogWrite() works for debugging.
only on the pins with the PWM symbol.
9. USB port- Used for powering your Genuino Uno, uploading your
2. Pin 13 LED- The only actuator built-in to your board. sketches to your Genuino, and for communicating with your Genuino
Besides being a handy target for your first blink sketch, sketch (via Serial. Printing () etc.).
this LED is very useful for debugging.
10. Reset button- Resets the ATmega microcontroller.
3. Power LED- Indicates that your Genuino is receiving
power. Useful for debugging.
Lesson 1: Blink Page 12 of 44
Connection:
Description:
Keeps the LED on as long as the button is
pressed.
Components:
•Arduino Uno board
•Solderless breadboard
•LED
•Resistor
•Jumper Wires
•Button Switch
Circuit Explanation:
Description:
In this lesson, we will create some sound using
Arduino and buzzers.
Components:
•Arduino Uno board
•Solderless breadboard
•Passive Buzzer
•Active Buzzer Circuit Explanation:
•Jumper Wires
In this circuit we have two electronic components, the
Connection: active and the passive buzzers. They make look same but their
behavior is different. Active buzzers makes beep sounds on their
own. It means that as soon as a voltage source is given, it starts to
beep. The passive buzzer is more like a speaker that makes variable
sounds depending on the tone programmed to it.
Lesson 3: Introduction to Buzzers(Code Discussion) Page 17 of 44
digitalWrite(active_buzzer,HIGH);
delay(200);
digitalWrite(active_buzzer,LOW);
Then we have used two for loops to give pwm signal to passive buzzer
from 0 to 255 for (int i = 0; i < 256; i++) {
analogWrite(passive_buzzer,i);
delay(10); }
and from 255 to 0.
for (int i = 255; i > 0; i--) {
analogWrite(passive_buzzer,i);
delay(10); }
Lesson 4: Knight Rider Page 18 of 44
Connection:
Description:
In this lesson, we are going to make a light set
like in the Knight Rider car.
Components:
•Arduino Uno board
•Solderless breadboard
•10 pcs LED
•10 pcs resistor
•Jumperwires
Lesson 4: Knight Rider (Code Discussion) Page 19 of 44
Here we have not given any names to the pins we just used the pin
numbers. In the setup we have used a for loop to configure the pins as
output instead of configure them one by one
for (int i = 2; i < 12; i++)
{ pinMode(i,OUTPUT); }
Then in the loop there are two for loops. First one is to light leds one after
one from pin 2 to pin 11
for (int i= 2; i < 12; i++)
{ digitalWrite(i,HIGH);
delay(delay_time);
digitalWrite(i,LOW); }
Other one is to light leds one after one from pin 11 to pin 2
for (int i= 11; i > 1; i--)
{ digitalWrite(i,HIGH);
delay(delay_time);
digitalWrite(i,LOW); }
Description:
In this lesson, we are going to change the
brightness of an LED.
Components:
•Arduino Uno board
•Solderless breadboard Circuit Explanation:
•LED
•Resistor A LED is connected with a current limiting resistor to
•Jumperwires arduino digital pin 9. It works as a PWM pin (analog output).
What is PWM?
Connection: PWM stands as pulse width modulation. This is a way to
output analog voltage out by using logic high and low.
Lesson 5: LED Fade(Code Discussion) Page 21 of 44
(Note that how i is varied from 0-255 by the for loop) delay is to keep
the led for each voltage for some time
Lesson 6: LED Fade with Potentiometer Page 22 of 44
Description:
In this lesson, we are going to change the
brightness of an LED using a potentiometer.
Components:
•Arduino Uno board
•Solderless breadboard Circuit Explanation:
•LED
•Potentiometer A LED is connected with a current limiting resistor to
•Jumperwires arduino digital pin 9. The middle pin of the potentiometer is
connected to the A0 pin of arduino.
Connection:
Most potentiometers have 3 pins. Middle pin has a variable
resistance relative to the other 2 pins.
Lesson 6: LED Fade with Potentiometer(Code Discussion) Page 23 of 44
In the loop you can see 4 code lines you are familiar with two of
them (analogWrite & delay) lets get to know about other two lines.
Let’s see the structure of the map function. Arduino map function
returns (output) a integer value that’s why we can use the “=” sign
directly. In the brackets you can see there are 5 values separated by
commas lets identify what are those.
•val – the input value. We can use a variable or a number directly for
this
•1 st 0 – the starting value of the input value’s range
•1023 – the end value of the input value’s range
•2 nd 0 – the starting value of the output value’s range
•255 – the end value of the output value’s range
Lesson 7: Light Sensing Circuit Page 24 of 44
Description:
In this lesson, we are going to fade an LED
according to the ambient light.
Components:
•Arduino Uno board
•Solderless breadboard
•LED Circuit Explanation:
•LDR
•Resistor Voltage Divider Circuit
•Jumperwires Voltage divider circuit is a simple circuit with two
resistors which is used to divide a voltage into two or more
Connection: parts according to a given ratio.
Description:
In this lesson, we are going to show numbers in a
seven segment display.
Components:
•Arduino Uno board
•Solderless breadboard
•Resistor
•Jumperwires Structure of a Seven Segment:
•Seven Segment Display
Seven segments consist of 7 (8 for ones with decimal
Connection: points) individual LEDS. Each pin is connected together to
form one common pin. The type of the display is decided by
this common pin as either common anode or common
cathode.
Lesson 8: Seven Segment(Code Discussion) Page 27 of 44
Lesson 8: Seven Segment(Code Discussion) Page 28 of 44
Lesson 8: Seven Segment(Code Discussion) Page 29 of 44
Components:
•Arduino Uno board
•Solderless breadboard
•Resistors
•Jumperwires
•4 digit Seven Segment Display
The following are the pin connections for this sample
Connection: tutorial:
Please refer to the .ino file included with this tutorial for
the full code. Explanations are added as comments to fully
understand the functions.
Lesson 10: Tilt-Activated LED Page 33of 44
Description:
In this lesson, we are going to turn the arduino’s
built-in LED on using the status of the ball switch sensor.
Components:
•Arduino Uno board
•Solderless breadboard
•Resistor What is a Ball Switch Sensor?
•Jumperwires
•Ball Switch Sensor Tilt sensors allow you to detect orientation or
inclination. They are small, inexpensive, low-power and
Connection: easy-to-use. They are usually made by a cavity of some
sort (cylindrical is popular) and a conductive free mass
inside, such as a blob of mercury or rolling balls. One end
has two conductive elements (poles). When the sensor is
oriented so that the end is downwards, the mass rolls
onto the poles and shorts them, acting as switch throw.
Please refer to the .ino file included with this tutorial for
the full code. Explanations are added as comments to fully
understand the functions.
Lesson 11: IR Remote Control Page 35 of 44
Description:
In this lesson, we are going to use the IR sensor
and remote control.
Components:
•Arduino Uno board
•Jumperwires
•IR sensor What is an IR Receiver Sensor?
•Remote Control
IR receivers/detectors are little microchips with a
Connection: photocell that are tuned to listen to infrared light. They
are almost always used for remote control detection.
Inside the remote is a matching IR led, which emits IR
pulses. IR light is not visible to the human eye, which
means it takes a little more work to test a setup.
Lesson 11: IR Remote Control(Code Discussion) Page 36 of 44
Please refer to the .ino file included with this tutorial for
the full code. Explanations are added as comments to fully
understand the functions.
Lesson 12: LED Dot Matrix Page 37 of 44
Description:
In this lesson, we are going to display using the Structure of a LED Matrix and pin connection
8x8 dot matrix
LED displays are often packaged as matrixes of
Components: LEDS arranged in rows of common anodes and columns
•Arduino Uno board of common cathodes, or the reverse.
•Jumperwires
•Solderless breadboard For this sample, the following is the pin connections
•Potentiometer
•8x8 LED Matrix Matrix Pin No. Arduino Pin No.
Connection: 1 13
2 12
3 11
4 10
5 16 (analog pin 2)
6 17 (analog pin 3)
7 18 (analog pin 4)
8 19 (analog pin 5)
9 2
10 3
11 4
12 5
13 6
14 7
15 8
16 9
Lesson 12: LED Dot Matrix (Code Discussion) Page 38of 44
Please refer to the .ino file included with this tutorial for
the full code. Explanations are added as comments to fully
understand the functions.
Lesson 13: Reading the Room Temperature Page 39 of 44
Description:
In this lesson, we are going to use the LM35 in
the room temperature.
Components:
•Arduino Uno board
•Jumperwires
•Solderless breadboard Structure of the LM35 Sensor
•LM35 Sensor
Connection:
Description:
In this lesson, we are going to display the RGB What is an RGB LED Module
LED Module to display variable colors.
A full color LED module is a circuit in which an LED
Components: can be lit to any color. This is why it is called a full color LED
•Arduino Uno board module. By programming the module with a microcontroller,
•Jumperwires we can program the LED to turn to any color that we want.
•Solderless breadboard How the module works is it has 3 PWM (pulse width
•RGB LED Module modulation) pins which stand for the colors red, green, and
blue (RGB). The idea is that any color can be created with a
Connection: combination of red, green, and blue.
Please refer to the .ino file included with this tutorial for
the full code. Explanations are added as comments to fully
understand the functions.
Page 43 of 44