

One of these needs to be ground, the other three being actual GPIO pins used to control each of the individual LEDs. The Low Voltage Labs traffic lights connect to the Pi using four pins. Any HDMI display to show output from the Pi.


A power supply for your Pi (Raspberry Pi 4 requires a different USB C power supply).I’m going to assume you have a Pi 2 or 3 with 40 pins A Raspberry Pi (I’ll use the Pi 3 Model B here, but any model with GPIO pins will work - if you want to use the Pi Zero you’ll need to solder some headers onto it).

To try this out, you will need the following (links here mostly go to Adafruit, UK customers may want to consider Pimoroni as a UK based alternative, Amazon has most if not all of this stuff too): Most recently I looked at this for Arduino, Rust and. I subsequently wrote versions of this article describing the same process using the Go programming language ( here), Swift ( here), Java ( here), C ( here), Bash scripting ( here), Node.js ( here) and also Node RED ( here). In future posts, I’ll explore some other programming / devops concepts using the base setup described here. In this post I’ll look at setting up a Pi to drive the lights. I’ve recently been doing some simple Python programming with the Raspberry Pi and a set of traffic light LEDs that connect to it.
