UBC Logo

Worksheet Exercises

  • traffic

Task

We are to create a program to control a pair of traffic lights. One light controls traffic in the East-West direction, and the other in the North-South direction. arduino hardware

Hardware Setup

We need six LEDs for the program.

hardware layout Fritzing schematic: apsc160_traffic.fzz

ComponentCount
Full Size Breadboard1
LEDs (5 mm Round, Various)6
220 Ohm Resistor6


Software Implementation

traffic.ino