You are on page 1of 1

Arduino Workshop Assignment

Submission deadline: 11:59 pm, 6 March 2024


Instruction:

 Each DST group will be lent a kit with all the necessary components to complete the
assignment.
 This is an individual assignment that requires each student to complete. That means the kit
should be passed through each member of the group.
 Submission: Students are required to put their code together with a short video showing the
result for each task into a zip file and then submit it to Canvas.
 Grading: This assignment contributes 5% to your final grade according to the course’s
syllabus.
Task 1: Traffic light
Do the wiring on the breadboard and write an Arduino program to simulate a traffic light system as
follows:
- Turn LEDs on/off according to the following order: Green ON for 3 sec -> Yellow ON for 1 sec
-> Red ON for 3 sec -> Repeated
- Spin a servo motor (representing the vehicle) back and forth whenever the Green light is ON.
Hint: 3 LEDs (Green/Yellow/Red) should be connected to 3 pins of the Arduino (e.g., pins 10, 11,
12) via 3 registers. The motor is connected as in the workshop.
Task 2: Smart door
Assume our smart door system includes an IR sensor and an ultrasonic to detect objects and a servo
motor to open the door. Do the wiring on the breadboard and write an Arduino program to operate
the system as follows:
- The motor spins from 00 to 900 and back to 00 when the IR detects an object.
- The motor also spins as above if a button is pressed (to simulate an emergency button).
- Incentive: The student will receive extra points if both the IR and ultrasonic sensors can be
used to control the motor.
Note: The IR and Ultrasonic sensors can be plugged into the breadboard as follows:

You might also like