You are on page 1of 2

Rename filename.

Class SE17xx Group 01


# Student ID Student Name Task
1
2
3
4
5

IOT 102: PROGRESS TEST 1


DO NOT COPY
Components: Arduino Uno, LED,…
Task: Design a traffic light system.

Description:

- There are 6 LEDs in the traffic light system: G1, Y1, R1 and G2, Y2, R2 (representing Green,
Yellow, and Red of Street 1-3 and 2-4, respectively).
- There are two modes: auto (A) and manual (M). If the auto mode is selected, traffic lights operate
with the defined delay. If manual mode is selected, the traffic lights are controlled from serial
input.
- In auto mode: the defined delay values are as below:

- In manual mode: input the name of the light (G1, Y1, R1 and G2, Y2, R2) to turn on the
corresponding light, and the others are controlled accordingly.
- In serial input:

1
Rename filename.

o Type A  enter Auto mode.


o Type M  enter Manual mode
 Type G1 (or R2)  turn on Green 1 and Red 2 (after turning on Yellow 2 for 2
seconds) while the other LEDs are off.
 Type R1 (or G2)  turn on Red 1 (after turning on Yellow 1 for 2 seconds) and
Green 2 while the other LEDs are off.
Note: When changing from Green to Red, Yellow is on for 2 seconds

Reference:
https://www.civil.iitb.ac.in/tvm/nptel/571_TrSignal/web/web.html
https://www.tinkercad.com/things/bR15c4ltSPD-copy-of-2-way-traffic-light/editel?tenant=circuits

Answer
1. Block diagram:

2. Picture of your design:

3. Flowchart (algorithm)

4. Code:

5. Tinkercad link:

6. Video clip (Google Drive):

You might also like