Uctronics Ultimate Starter Kit for Arduino User manual




4
Component List
No. Name Picture Qty
1 UNO R3 / MEGA2560 R3 1
2 UNO R3 /
MEGA 2560 R3 Proto Shield V3
1
3 400 Tie / 830 Tie Point Breadboard 1
4 65 Male to Male Jumper Wire 1
5 15cm Male to Female DuPont Wire 20
6 USB Cable 1
7 9V Battery Clip 1
8 9V 1A Power Supply 1
9 220Ω Resistor 20
10 1KΩ Resistor 20
11 10KΩ Resistor 10

5
No. Name Picture Qty
12 SS12D00G3 Switch 2
13 Power Supply Module for
Breadboard
1
14 5mm Green LED 4
15 5mm Yellow LED 4
16 5mm Blue LED 4
17 5mm Red LED 8
18 74HC595 IC 2
19 6x6x5mm Button 8
20 5mm RGB LED 1
21 5V Active Buzzer 1
22 16R Passive Buzzer 1
23 S8050 NPN Transistor 2

6
No. Name Picture Qty
24 S8550 PNP Transistor 2
25 SW520D Tilt Switch 2
26 7-Segment Display 1
27 GL5528 Photo Resistor 2
28 5V Relay Module 1
29 1N4007 Diode 4
30 1N4148 Diode 4
31 4-bit 7 Segment LED 1
32 SG90 9g Servo 1
33 DC Motor 1
34 L9110 DC Motor Driver IC 1
35 Fan 1

7
No. Name Picture Qty
36 Stepper Motor 1
37 ULN2003 Stepper Motor Driver 1
38 PIR Motion Sensor 1
39 1602 LCD 1
40 10K Potentiometer 2
41 502 5K Thermistor 1
42 DHT11 Temp & Humi Sensor 1
43 Joystick Module 1
44 HC-SR04 Ultrasonic Sensor 1
45 HX1838 IR Receiver 1
46 21 keys Remote Controller 1
47 10 Segment LED 1

8
No. Name Picture Qty
48 4x4 Matrix Keyboard 1
49 RTC Module 1
50 Water Lever Sensor 1
51 Sound Sensor Module 1
52 MAX7219 8x8 LED Module 1
53 NE555 Timer 1
54 Ceramic Capacitor (104 100nf) 10
55 10uF Electrolytic Capacitor 2
56 MPU-6050 Module 1
57 Rotary Encoder Module 1
58 ESP8266 Module 1

9
Prerequisite
Install Arduino IDE
The Arduino software IDE Integrated Development Environment (IDE) allows you to write
programs and upload them to your board.
Here, you will learn how to set
up
the software to
program your board.
Step 1: Go to the Arduino download page: https://www.arduino.cc/en/Main/Software shown
in Figure 1.
The version
available
from official
website is
the latest version, the figures in this tutorial might
be slightly different from yours.
Select one Arduino IDE according to your operating system download. (Take Windows as an
example) There are two versions of Arduino for Windows: Installer and
ZIP file.
Click “Windows
Installer”.
Figure 1 Arduino IDE Download Page
Step 2:
Press the button
“JUST DOWNLOAD” to download the software
shown in Figure 2.
Figure 2 Download

10
Step 3: Double click the "windows.exe" file to the following dialog box and then click "I Agree"
and then click "Next".
Step 4: Click "Browse" to choose the installation path or enter a directory at the Destination
Folder. Click "Install" to initiate installation.
Step 5: After installation ended, click "Close" to finish.

11
Step 6: When the dialog box pop us like Figure 2 shown, Select Always trust software for
"Adafruit Industries" and click "Install".
Step 7: When the installation is done, click "Close". Then an Arduino icon will appear on the
desktop:

12
Add Libraries and Open Serial Monitor
Add Libraries
Libraries are a collection of code that makes it easy for you to connect to a sensor, display,
module, etc. For example, the built-in LiquidCrystal library makes it easy to talk to character
LCD displays. Libraries provide extra functionality for use in sketches, e.g. working with
hardware or manipulating data. There are hundreds of additional libraries available on the
Internet for download. To use the additional libraries, you will need to install them.
To install the library, first exit the Arduino IDE. Then unzip the ZIP file of the library (download
from the GitHub link). Copy the library file into your libraries folder (This PC\ Documents\
Arduino\ libraries\). Next, restart the Arduino IDE, you will find the library appears in the
Sketch->include library shown in Figure 3.
There may be more files excluding the .cpp and .h files in the library folder, make sure
they're all there. The library won't work if you put the .cpp and .h files directly into the
libraries folder or if they're nested in an extra folder.
Figure 3 Include library

13
Compile and download program.
Click the tools to select the correct board and the port you're using as shown in figure 4 and
figure 5.
Figure 4 Select Board
Figure 5 Select Port
Click the verify icon to compile and make sure your program is correct and then click the
upload icon to download the program shown in Figure 6 and Figure 7.
Figure 6 Verify sketch Figure 7 Download sketch
Open Serial Monitor
The Serial Monitor is a separate pop-up window that acts as a separate terminal that

14
communicates by receiving and sending serial data. The serial monitor is the 'tether' between
the computer and your UNO. It lets you send and receive text messages, handy for debugging
and also controlling the UNO from a keyboard. See the icon on the upper right of Figure 8. You
just need to click the serial monitor icon to open it.
Figure 8 Serial monitor
To send data to the board, enter text and click on the "send" button or press enter. Choose the
baud rate from the drop-down that matches the rate passed to Serial.begin in your sketch.
Which port selected to open in the serial monitor is the same as the port for uploading Arduino
code. Go to Tools -> Serial Port, and select the correct port.
How to start a lesson
Step 1 Add the library (This step only needs to do once, if you have already installed, please
skip this step.)
Step 2 Find and double click the file of lesson code, then you will see the IDE dialog box.
Step 3 Connect the components according to the connection schematic and wiring diagram.
Then connect your UNO board or MEGA2560 to PC via the USB cable.
Step 4 Compile and download the program. Then you will see the result.

15
Lessons
Lesson 1 Blink and Breathing LED
Overview
In this project, you will learn the simplest thing you can do with an Arduino and see physical
world by blinking the on-board LED and without doing any programming.
Second step, you will learn how to use the PWM square-wave signal to control the external
LED as a breathing lamp which gradually becomes brighter and then gradually becomes dark.
Components required
Name Qty Name Qty
UNO R3 or MEGA 2560 1 220Ω Resistor 1
5mm Red LED 1 DuPont Wire 2
Component Introduction
The UNO R3 board has rows of connectors along both sides that are used to connect to
different electronic devices and plug-in 'shields' that extends its capability.
It also has a single LED that you can control from your sketches. This LED is built onto the
UNO R3 board and is often referred to as the 'L' LED as this is how it is labeled on the board.
You may find that your UNO R3 board's 'L' LED already blinks when you connect it to a USB
plug. This is because the boards are generally shipped with the 'Blink' sketch pre-installed.
Since the first experiment of blinking onboard LED is quite so easy without any programming,
it just gives you an idea about how electronic device works. The next step we will try something
interesting and more complex by connecting a breadboard and external LED to build a
breathing lamp.
Breadboard is just a grid of holes in a plastic block. Inside are
strips of metal that provide electrical connection between holes
in the shorter rows. Pushing the legs of two different
components into the same row joins them together electrically.
LED is the abbreviation of light emitting diode. The LED has two electrodes, a positive
electrode and a negative electrode, it will light only when a forward current passes. Generally,
the drive current for LED is 5-20mA. Therefore, it needs an extra resistor for current limitation

16
to protect the LED. Otherwise, it will burn out!
In the following connection schematic, you will see the picture shown "+" "-"
In the wiring diagram, the longer pin (the curved pin) represents anode, the opposite one is
cathode.
5v
0v
5v
0v
5v
0v
5v
0v
5v
0v
Pulse Width Modulation
0% Duty Cycle-analogWrite(0)
25% Duty Cycle-analogWrite(64)
50% Duty Cycle-analogWrite(127)
75% Duty Cycle-analogWrite(191)
100% Duty Cycle-analogWrite(255)
+-
In the first step experiment we blink the onboard LED by tuning it on and off, the brightness of
LED can't be changed. So in the second step we will use PWM technique to adjust the brightness.
Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means.
Digital control is used to create a square wave, a signal switched between on and off. This on-off
pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion
of the time the signal spends on versus the time that the signal spends off. The duration of "on
time" is called the pulse width. To get varying analog values, you change, or modulate, that pulse
width. If you repeat this on-off pattern fast enough with an LED for example, the result is as if the
signal is a steady voltage between 0 and 5v controlling the brightness of the LED.
In the diagram below, the green lines represent regular time period. This duration or period is
the inverse of the PWM frequency. In other words, with Arduino's PWM frequency at about 500Hz,
the green lines would measure 2 milliseconds each. A call to analog Write () is on a scale of 0 - 255,
such that analog Write (255) requests a 100% duty cycle (always on), and analog Write (127) is a
50% duty cycle (on half the time) for example.

17
Wiring Diagram
Result
LED is lit up and went out gradually like breathing.

18
Lesson 2 LED Flowing Lights
Overview
In this lesson, you will master how to use eight large red LEDs with an UNO or MEGA2560
board without using up 8 output pins.
Components required
Name Qty Name Qty
UNO R3 or MEGA 2560 1 220Ω Resistor 8
LED 8 DuPont Wire 17
74HC595 IC 1 Breadboard 1
Component Introduction
The 74HC595 is an 8-stage serial shift register with a storage register
and 3-state outputs. Each of which can either be a 1 or a 0. The shift
register and storage register have separate clocks. To set each of
these values on or off, we feed in the data using the pin 'Data' and 'Clock' of the chip.
The clock pin is used to receive eight pulses. At each pulse, if the pin "data" is high, then a 1
gets pushed into the shift register; otherwise, a 0.
When all eight pulses have been received, enabling the pin of "Latch" copies those eight values
to the latch register. This is necessary; otherwise, the wrong LEDs would flicker as the data is
being loaded into the shift register.
The chip also has an output enable pin (OE), which is used to enable or disable the outputs
all at once. You could attach this to a PWM-capable pin of UNO and use 'analog Write' to
1 0 1 1 0 0 1 1
Data
Clock
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
Data Clock Latch
pin14 pin11 pin12
pin15
pin1
pin2
pin3
pin4
pin5
pin6
pin7
Outputs

19
control the brightness of the LEDs. This pin is active low, so in this lesson we tie it to GND.
Connection Schematic
Wiring Diagram
Result
LEDs flash in turn.
Q0
Q1
Q2
Q3
Q4
Q5
Q6
Q7
GND
VCC
DS
OE
ST_CP
SH_CP
MR
Q7'
220R
220R
220R
220R
220R
220R
220R
220R
UNO R3/
Mega 2560
74HC595
AREF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
D10
D11
D12
D13
GND
SDA
SCL/RESET
3V3
5V
A0
A1
A2
A3
A4
A5
GND1
GND2
VIN
Analog Input
Digi tal Input/Output
ARDUINO-NOHOLE

20
Lesson 3 Digital Inputs-Switches
Overview
In this lesson, you will master how to use buttons with digital inputs to turn LED on and off.
Components Required
Name Qty Name Qty
UNO R3 or MEGA 2560 1 220Ω Resistor 1
5mm Red LED 1 DuPont Wire 7
Push Switches 2 Breadboard 1
Component Introduction
The switch is a simple component. When you press a button or flip a lever, they
connect two contacts together so that electricity can flow through them.
Actually, there are only really two electrical connections. Inside the switch
package, pins B and C are connected together as same as pins A and D.
Wiring Diagram
Result
Press the left button, the LED will be lit, and press the right button, LED will be extinguished.
Table of contents
Other Uctronics Microcontroller manuals
Popular Microcontroller manuals by other brands

Freescale Semiconductor
Freescale Semiconductor FLEXIS EVB51JM128 quick start guide

AXIOMTEK
AXIOMTEK IRU152-I Reference manual

Silicon Laboratories
Silicon Laboratories Telegesis ETRX357DVK product manual

Cypress
Cypress CY8CKIT-042-BLE-A quick start guide

Atmel
Atmel ATtiny13A manual

NXP Semiconductors
NXP Semiconductors S12ZVM-EWP user guide