You are on page 1of 18

GROUP ID NHÓM 3

NGUYỄN HỮU THỌ - 2002210238

TRẦN XUÂN CẢNH-2002210256


STUDENT’S NAME

LÊ THẠCH ANH TÀI-2002210206

NGUYỄN DƯƠNG KIỆT-2002210181

NGUYỂN BẢO ĐẠI-20022324

FINAL SCORE

Lab 1 – Introduction to Arduino & Arduino Programming

Task 2.2: LED Blink with built-in LED

1. Use built-in LED (LED 13) for testing

Figure 2.2.1: Using Breadboard.

1. Use built-in LED (LED 13) for testing


Figure 2.2.2 Simulation on software Proteus

- Video thí nghiệm 2.2.2


2. Write the code with Arduino IDE:

- LED works in duty cycle: Turn on in 1s and off in 1s.

Program:
- Change the duty cycle (on/off interval) and see how it works.

Program:

Task 2.3: LED Blink with breadboard


1. Use Fritzing tool to draw a circuit diagram as shown in Figure 2.3.1

Figure 2.3.1: Using Breadboard.


2. Connect LED, and resistor 100 Ω via breadboard and Pin 10 on Arduino (figure
2.3.1)

Figure 2.3.2 Simulation on software Proteus

- Video thí nghiệm 2.3.2


3. Write the code with Arduino IDE:

LED works in duty cycle: Turn on in 1s and off in 1s

Print message in Serial monitor

Print “LED on” in Serial monitor when turning LED on

Print “LED off” in Serial monitor when turning LED off.

Program:

Task 2.4: LEDs in serial mode


1. Connect 3 LEDs, and resistor 220 Ω via breadboard in serial connection and Pin 10
on Arduino
Figure 2.4.1 Simulation on software Proteus
- Video thí nghiệm 2.4.1
.
2. Write the code with Arduino IDE:
LED works in duty cycle: Turn on in 1s and off in 1s
Print message in Serial monitor:
+ Print “3 LED in serial mode on” in Serial monitor when turning LED on
+ Print “3 LED in serial mode off” in Serial monitor when turning LED off
Program:

Figure 2.4.2: Messages are displayed on the Serial Monitor port.


Task 2.5: LEDs in parallel mode
1. Connect 3 LEDs, and resistor 220 Ω via breadboard in parallel mode and Pin 10 on
Arduino

Figure 2.5.1 Simulation on software Proteus


- Video thí nghiệm 2.5.1
2. Write the code with Arduino IDE:
LED works in duty cycle: Turn on in 1s and off in 1s
Print message in Serial monitor:
+ Print “3 LED in parallel mode on” in Serial monitor when turning LED on
+ Print “3 LED in parallel mode off” in Serial monitor when turning LED off
Program:
Task 2.6: Turn ON/OFF LED in sequencing
1. Connect 3 LEDs, and resistor 220 Ω to 3 pin (8, 9, 10) on Arduino

Figure 2.6.1 Simulation on software Proteus


- Video thí nghiệm 2.6.1
2. Write the code with Arduino IDE:
- LED turn ON/OFF in sequencing (order 1, 2, 3, …)

Program:

Task 2.7: Make a traffic light system

1. Use 3 LEDs (Red, green, yellow) and resistor 220 Ω to connect to 3 pin
Digital I/O on Arduino
Figure 2.7.1: Simulation on software Proteus

- Video thí nghiệm 2.7.1


2. Make a traffic light system:
+ Green LED turn ON in 30s
+ Yellow LED on in 3s
+ Red LED on in 20s
+ Working continously in this cycle

Program:

You might also like