Setup LEDs (Hardware and Software)

Hardware and software required to get the Raspberry Pi and LED strip up and running.

Raspberry Pi Options:

  • Raspberry Pi Pico (microcontroller):
    • To build your own LED strip controlled by a Raspberry Pi Pico follow the instructions on ledPixelsPico.
    • The Pico is cheaper, easier to use, and easier to set up, but you'll need to plug it directly into your computer (USB port).
    Pico Picture
  • Raspberry Pi Zero/B+ etc (computer):
    • To set up any of the Raspberry Pi computers (these instructions assume the Pi has wifi) follow the instructions below.
    • Using one of the Raspberry Pi computers allows you to control the LED strip remotely, and build a web interface to control the LEDs.
Figure 1. LEDs and Raspberry Pi Zero W powered by a USB battery.

Hardware

You will need:

  1. Raspberry Pi Zero W or Raspberry Pi Pico (should also work with the B series). The server setup assumes that the Pi has a wifi chip so you won't be able to control the Pico remotely.
    • The Pi Zero WH, which includes headers would be the easiest to start with. Otherwise, you'll need to solder on your own headers (headers are the places wher you can plug in wires/jumpers).
    • I've also used the Pi Zero 2 W.
  2. WS281x LED strips (tested with WS2812B). These are individually addressable strips. The default programs use 20 LEDs.
    • If you have a month of lead time, I've used these before.
  3. Jumper cables
    • If you have a Pi with headers, and a new LED strip, you should be able to connect everything just using male-to-male jumpers.
  4. micro-USB cable or power supply:
    • You can power the Pi with just a micro-USB cable connected to the USB port on a computer.
    • Alternatively, pretty much any micro-USB power supply will work.
    • We have been able to run them off a USB battery (see Figure 1).

Figure 2. Raspberry Pi with three jumper cables (red, black, and green in the upper left) connected to the header, and a micro-USB cable (white) plugged in for power.
Figure 3. Individually addressable LED strips can be purchased in rolls and cut to size.

Software

rpi-led-strip: Software setup instructions are detailed at the GitHub repository.

Connecting

Connecting and Command Line: Instructions for connecting to the Pi and running programs to control the LEDs (using the command line).