LESSONLED Series · Part 8EP.12 · 20 s

Traffic light with 3 LEDs

// WHAT YOU WILL LEARN

Three LEDs on three pins, each with its own 220 Ω resistor: switch them ON → WAIT → OFF in turn to make a traffic light.

// LESSON NOTES

Part 8: build a TRAFFIC LIGHT with 3 LEDs 🚦

Each LED gets its own pin (12, 11, 10) and its own 220 Ω resistor. All of them share one GND.

The code is just ON → WAIT → OFF, three times:
red 3 s → green 3 s → yellow 1 s → repeat.

Turn each LED OFF before the next one, so only one light is on at a time.

Related lessons