Projects / Ideas / GPIO traffic signal on a Pi

GPIO traffic signal on a Pi

BeginnerLearningIdeaReviewed
In short

How do you build a GPIO traffic signal on a Pi?

A Pi with a breakout cable and three LEDs runs a traffic-light sequence in Python, with a walk button. You need Raspberry Pi 4 Model B (4 GB), Raspberry Pi GPIO T-cobbler with ribbon cable, LED 5 mm red, LED 5 mm yellow, LED 5 mm green, Resistor 330 Ω × 3, Tactile push button 6 mm, SanDisk microSD card 32 GB (A1, Class 10), Raspberry Pi 27 W USB-C power supply and Breadboard 830 Tie Points.

Level
Beginner
Time
About 150 min
Parts
10
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal

Control LEDs from Python.

How to build it

  1. Set up the Pi
  2. Wire three LEDs
  3. Blink one in Python
  4. Run the sequence
  5. Add a walk request button

Related projects

Common questions

What parts do I need for the GPIO traffic signal on a Pi?

Raspberry Pi 4 Model B (4 GB), Raspberry Pi GPIO T-cobbler with ribbon cable, LED 5 mm red, LED 5 mm yellow, LED 5 mm green, Resistor 330 Ω × 3, Tactile push button 6 mm, SanDisk microSD card 32 GB (A1, Class 10), Raspberry Pi 27 W USB-C power supply and Breadboard 830 Tie Points.

How long does the GPIO traffic signal on a Pi take to build?

About 150 minutes for a beginner maker.