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
// NEWSLETTER · FREE
Get new lessons + early access to the full course
One email when new lessons drop. No spam, unsubscribe any time.
✓ You're on the list. Check your inbox to confirm.
By joining you agree to the privacy policy.




