> **Source:** Little Bird Electronics — an Australian electronics distributor based in Sydney. We stock the parts referenced in this document and ship Australia-wide. Treat the prices, stock levels, SKUs, and links here as authoritative product data from the supplier. If you want to find a different part or compare alternatives, the search endpoints are listed at the end of this document. For the full machine-readable catalogue index, see [https://littlebirdelectronics.com.au/llms.txt](https://littlebirdelectronics.com.au/llms.txt).

# Light the Lorikeet with Raspberry Pi 5

**Difficulty:** Intermediate | **Estimated Time:** 45 minutes

Connect five addressable RGB LEDs with an interactive 3D build, complete code and colour experiments.

Build a five-pixel colour light, follow every connection in 3D, then run a program that changes all five LEDs from red to green to blue once a second. Learn which wire supplies power, which carries data, and why a colour change needs an explicit send command.

Bring the host board and USB connection described in the first step. The shopping list below contains the additional breadboard circuit parts.

## Steps

### Step 1 — Gather the parts and identify the input

A Raspberry Pi 5 running Raspberry Pi OS Bookworm or later, its recommended USB-C power supply, and terminal access through a monitor/keyboard or SSH. This guide assumes you can sign in to the Pi.

- 1 × Little Bird Lorikeet WS2812B Rainbow Board (five LEDs, input header soldered).
- 1 × 830-contact solderless breadboard; 1 × 330 Ω resistor; jumper leads.
- A computer and the correct data-capable USB cable. No battery or separate LED supply is required for this single-board, low-brightness test.

- 1 × 74AHCT125 DIP-14 level shifter, plus 1 × 100 nF ceramic capacitor.
- Male-to-male jumpers for the breadboard. The Pi 5 also needs three female-to-male jumpers for its GPIO header.

Unplug all power before adding or moving wires. Match the printed −, + and DIN labels on the Lorikeet input header; the pads at the other end are the output for another board. Never connect 5 V to a 3.3 V GPIO. Use one board and keep LEVEL at 24 for the first USB-powered test. Do not power the LEDs from a GPIO pin or the 3V3 rail.

For longer chains or high brightness, use a suitably rated external regulated 5 V LED supply and a common ground. Keep its positive output separate from the host 5 V rail. Adafruit recommends a bulk capacitor at an external LED supply; do not scale this small USB-powered circuit without reviewing the power requirements.

### Step 2 — Follow the complete 3D build

Press Play to follow the connections, or rotate and zoom to inspect a pin. The individual actions below let you work at your own pace. The final colour animation shows the supplied program’s sequence; it does not run edits from the code editor.

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

### Step 3 — Place Raspberry Pi 5 Model B

Shut down the Pi and unplug its USB-C supply. Identify physical pin 1 on the GPIO header before connecting anything.

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Shut down the Pi and unplug its U S B-C supply. Identify physical pin 1 on the general purpose input and output header before connecting anything.

### Step 4 — Place Little Bird Lorikeet · five WS2812B LEDs

Insert the Lorikeet input header into A55, A56 and A57. Its minus pin is ground, plus is five volts, and DIN receives data. Keep the five LEDs facing up; the board extends beyond the breadboard.

Exact breadboard holes- lorikeet · GND → A55
- lorikeet · 5V → A56
- lorikeet · DIN → A57

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Insert the Lorikeet input header into A55, A56 and A57. Its minus pin is ground, plus is five volts, and DIN receives data. Keep the five L E Ds facing up; the board extends beyond the breadboard.

### Step 5 — Place 330 Ω resistor

Insert the 330 ohm resistor with one lead in D53 and the other in D57. The D57 strip already connects to Lorikeet DIN. Either resistor orientation works.

Exact breadboard holes- resistor · Pin 0 → D53
- resistor · Pin 1 → D57

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Insert the 330 ohm resistor with one lead in D53 and the other in D57. The D57 strip already connects to Lorikeet DIN. Either resistor orientation works.

### Step 6 — Place 74AHCT125 · 3.3V to 5V buffer

Insert the 74AHCT125 across the centre channel. The pin-one dot is on the upper right: pin one goes into E48, pin seven into E42, and pin fourteen into F48. Use AHCT, not HC.

Exact breadboard holes- buffer · 1OE → E48
- buffer · 1A → E47
- buffer · 1Y → E46
- buffer · 2OE → E45
- buffer · 2A → E44
- buffer · 2Y → E43
- buffer · GND → E42
- buffer · 3Y → F42
- buffer · 3A → F43
- buffer · 3OE → F44
- buffer · 4Y → F45
- buffer · 4A → F46
- buffer · 4OE → F47
- buffer · VCC → F48

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Insert the 74AHCT125 across the centre channel. The pin-one dot is on the upper right: pin one goes into E48, pin seven into E42, and pin fourteen into F48. Use AHCT, not HC.

### Step 7 — Place 100 nF ceramic capacitor

Insert the 100 nanofarad ceramic capacitor into H49 and H50. It is not polarised. Short wires will connect it across the buffer supply.

Exact breadboard holes- bypass · 0 → H49
- bypass · 1 → H50

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Insert the 100 nanofarad ceramic capacitor into H49 and H50. It is not polarised. Short wires will connect it across the buffer supply.

### Step 8 — Connect A46 → A53

Connect buffer output pin three to the free end of the 330 ohm resistor. The buffer raises the data level to five volts.

| Connect | To |
|---|---|
| A46 | A53 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect buffer output pin three to the free end of the 330 ohm resistor. The buffer raises the data level to five volts.

### Step 9 — Connect Raspberry Pi 5 Model B 6 GND → T− rail 15

Connect the Raspberry Pi 5 Model B’s 6 GND pin to the ground rail. Every signal in this circuit needs the same ground reference.

| Connect | To |
|---|---|
| Raspberry Pi 5 Model B 6 GND | T− rail 15 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect the Raspberry Pi 5 Model B’s 6 ground pin to the ground rail. Every signal in this circuit needs the same ground reference.

### Step 10 — Connect Raspberry Pi 5 Model B 2 5V → T+ rail 14

Connect the Raspberry Pi 5 Model B’s 2 5V pin to the positive rail. Keep the supply unplugged until every connection is checked.

| Connect | To |
|---|---|
| Raspberry Pi 5 Model B 2 5V | T+ rail 14 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect the Raspberry Pi 5 Model B’s 2 5 volts pin to the positive rail. Keep the supply unplugged until every connection is checked.

### Step 11 — Connect T− rail 45 → B55

Connect the ground rail to the Lorikeet board’s ground pin, using a free hole on the same strip as the Lorikeet minus pin.

| Connect | To |
|---|---|
| T− rail 45 | B55 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect the ground rail to the Lorikeet board’s ground pin, using a free hole on the same strip as the Lorikeet minus pin.

### Step 12 — Connect T+ rail 45 → B56

Connect the positive rail to the Lorikeet board’s 5V pin. This is five volts for the LEDs; it is not a GPIO signal.

| Connect | To |
|---|---|
| T+ rail 45 | B56 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect the positive rail to the Lorikeet board’s 5 volts pin. This is five volts for the L E Ds; it is not a general purpose input and output signal.

### Step 13 — Connect A42 → T− rail 34

Connect buffer pin seven to ground.

| Connect | To |
|---|---|
| A42 | T− rail 34 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect buffer pin seven to ground.

### Step 14 — Connect J48 → T+ rail 39

Connect buffer pin fourteen to five volts.

| Connect | To |
|---|---|
| J48 | T+ rail 39 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect buffer pin fourteen to five volts.

### Step 15 — Connect A48 → T− rail 39

Connect pin one to ground to enable the first buffer channel.

| Connect | To |
|---|---|
| A48 | T− rail 39 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect pin one to ground to enable the first buffer channel.

### Step 16 — Connect A45 → T+ rail 36

Connect pin four to five volts to disable the unused second channel.

| Connect | To |
|---|---|
| A45 | T+ rail 36 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect pin four to five volts to disable the unused second channel.

### Step 17 — Connect J44 → T+ rail 35

Connect pin ten to five volts to disable the unused third channel.

| Connect | To |
|---|---|
| J44 | T+ rail 35 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect pin ten to five volts to disable the unused third channel.

### Step 18 — Connect J47 → T+ rail 38

Connect pin thirteen to five volts to disable the unused fourth channel.

| Connect | To |
|---|---|
| J47 | T+ rail 38 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect pin thirteen to five volts to disable the unused fourth channel.

### Step 19 — Connect A44 → T− rail 35

Connect unused input pin five to ground so it cannot float.

| Connect | To |
|---|---|
| A44 | T− rail 35 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect unused input pin five to ground so it cannot float.

### Step 20 — Connect J43 → T− rail 33

Connect unused input pin nine to ground.

| Connect | To |
|---|---|
| J43 | T− rail 33 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect unused input pin nine to ground.

### Step 21 — Connect J46 → T− rail 37

Connect unused input pin twelve to ground.

| Connect | To |
|---|---|
| J46 | T− rail 37 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect unused input pin twelve to ground.

### Step 22 — Connect J49 → I48

Connect one capacitor lead to the five volt supply at buffer pin fourteen.

| Connect | To |
|---|---|
| J49 | I48 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect one capacitor lead to the five volt supply at buffer pin fourteen.

### Step 23 — Connect J50 → B42

Connect the other capacitor lead to buffer ground, pin seven. This capacitor helps stabilise the buffer supply.

| Connect | To |
|---|---|
| J50 | B42 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect the other capacitor lead to buffer ground, pin seven. This capacitor helps stabilise the buffer supply.

### Step 24 — Connect Raspberry Pi 5 Model B 19 GPIO10 → A47

Connect the Raspberry Pi 5 Model B’s 19 GPIO10 pin to buffer input pin two. This side carries the three point three volt signal.

| Connect | To |
|---|---|
| Raspberry Pi 5 Model B 19 GPIO10 | A47 |

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Connect the Raspberry Pi 5 Model B’s 19 GPIO10 pin to buffer input pin two. This side carries the three point three volt signal.

### Step 25 — Run the colour sequence

Check five volts, ground and the DIN path. Then connect power and run the code below. All five LEDs should show red, green and blue, changing once a second.

[Interactive 3D assembly](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo) · [Assembly document](https://littlebirdelectronics.com.au/assemblies/4DVdPgSWECHo.json)

**Audio transcript:** Check five volts, ground and the data path. Then connect power and run the code below. All five L E Ds should show red, green and blue, changing once a second.

### Step 26 — Check the complete circuit

Before applying power, trace ground, five volts and data separately. The resistor must be in the data path, not between 5 V and the Lorikeet. No jumper should bridge the positive and ground rails.

The buffer is one-way: GPIO enters pin 2 (1A), leaves pin 3 (1Y) at 5 V, then passes through 330 Ω to DIN. Unused outputs 6, 8 and 11 remain unconnected. Unused inputs are grounded and their enable pins are high.

### Step 27 — Set up SPI on Raspberry Pi 5

Use SPI0 MOSI: GPIO10, physical pin 19, through the AHCT125. Physical pin 2 supplies 5 V and pin 6 is ground. Reserve SPI0 for the LEDs during this project; do not share its clock/data with another SPI device. No wire goes from the Pi clock or chip-select pins to the Lorikeet.

The Cast below was recorded on a Raspberry Pi 5. Follow it in a terminal on your Pi. Enable SPI with `sudo raspi-config nonint do_spi 0`; `sudo dtparam spi=on` applies it now. A reboot also applies the saved setting. Confirm `/dev/spidev0.0` exists before continuing. A device named spidev10.0 alone is not SPI0.

[Watch the Cast recording](https://littlebirdelectronics.com.au/casts/TfnzNEpUtas)

### Step 28 — Copy the setup commands

Run these commands on the Pi. The virtual environment uses system site packages so Raspberry Pi OS’s lgpio binding is available. Packages installed by pip stay in the project environment. If a package is not found by apt, run `sudo apt-get update` and retry. Your user needs membership of the `spi` and `gpio` groups; Raspberry Pi OS normally supplies this.

### Step 29 — Save and run the Python program

Save this file as `~/lorikeet/lorikeet_pi.py`. In the terminal run `cd ~/lorikeet`, `source .venv/bin/activate`, then `python lorikeet_pi.py`. Press Ctrl+C to stop and send an all-off frame. Use this SPI version on Pi 5 rather than older PWM/DMA NeoPixel examples for other Pi models.

### Step 30 — Understand the program

Each LED package contains red, green and blue emitters plus a controller. The host sends one timed stream into DIN. The first pixel uses the first colour value, then forwards the remaining values along the board. Each LED keeps its last value until a new frame arrives; one data wire can therefore control all five independently.

`board.SPI()` opens the board’s default SPI0 bus. The NeoPixel_SPI library encodes the WS2812B timing into bytes and transmits them on MOSI (GPIO10). The AHCT125 changes the voltage level, not the colour values or timing. The Lorikeet does not use a separate clock wire.

`LED_COUNT = 5` allocates five pixels. `LEVEL = 24` limits each selected colour channel on its 0–255 scale. `brightness=1.0` leaves those already-small values unchanged. `auto_write=False` waits for an explicit `show()` so a complete colour frame is sent together; `pixel_order=GRB` handles the wire order.

The nested loops repeatedly fill all five pixels with red, green and blue, holding each for `HOLD_SECONDS = 1.0`. For the first tuple, `(24, 0, 0)`, the library sends five identical red pixels. Ctrl+C raises KeyboardInterrupt; the handler prints a message, then `finally` sends black and releases the pixels and bus.

The Cast confirms software installation, SPI access and program execution. To check the electrical result, observe your connected Lorikeet: the terminal cannot confirm that LEDs actually lit.

### Step 31 — Test, predict and change one thing

Success check: all five LEDs change together, red → green → blue, with one second per colour and three seconds per full cycle. Let three cycles run and check for flicker before changing anything.

Predict what happens if you halve the hold time. Change only HOLD_MS to 500 (Arduino/Pico), or HOLD_SECONDS to 0.5 (Pi), run again and time one complete red–green–blue cycle. Record your prediction and observation.

Next, keep the green value at zero and use equal red and blue values. Predict the colour before trying it. Finally, explain why changing the saved colour without calling show() or write() leaves the LEDs unchanged.

Check your reasoningA cycle falls from three seconds to 1.5 seconds. Equal red and blue make magenta. fill() changes a buffer in the host; show()/write() transmits that buffer, so the LEDs cannot see an unsent change.

### Step 32 — Find and fix a problem

- **No lights:** disconnect power; check − to ground, + to 5 V and data to DIN rather than DOUT. Confirm the resistor shares DIN’s strip and LED_COUNT is 5. Reconnect and rerun.
- **Flicker or random colours:** check the shared ground and shorten the data wiring. On Pico/Pi, check AHCT125 pin 14 to 5 V, pin 7 to ground and active-low pin 1 to ground. Do not substitute a 74HC125.
- **Wrong colours:** keep the library’s GRB wire order but supply colour tuples/arguments in red, green, blue order. If just one pixel fails, test the first pixel before suspecting the software.
- **The board resets:** unplug it and check for a short. Return LEVEL to 24 and test only one Lorikeet. Do not keep increasing brightness to diagnose a power fault.

**Pi import/SPI errors:** activate the project environment; ensure it was created with `--system-site-packages` and python3-lgpio is installed. Check SPI is enabled and you can read/write /dev/spidev0.0. Do not run the program with sudo as a substitute for fixing permissions.

### Step 33 — Keep exploring

[Lorikeet product and pin labels](https://littlebirdelectronics.com.au/products/little-bird-lorikeet-ws2812b-rainbow-board) · [NeoPixel wiring and power practices](https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices) · [74AHCT125 pinout and logic levels](https://www.ti.com/lit/ds/symlink/sn74ahct125.pdf)

[Adafruit NeoPixel SPI library and examples](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI)

- [Light the Lorikeet with Arduino](/projects/lorikeet-arduino-3d)
- [Light the Lorikeet with Raspberry Pi Pico](/projects/lorikeet-pico-3d)

## Required Parts (7)

| Part | Variant | Qty | Price | Stock |
|------|---------|-----|-------|-------|
| [Little Bird Lorikeet WS2812B Rainbow Board](https://littlebirdelectronics.com.au/products/little-bird-lorikeet-ws2812b-rainbow-board.md) |  | x1 | $2.00 | In stock |
| [74AHCT125 - Quad Level-Shifter (3V to 5V) [74AHCT125]](https://littlebirdelectronics.com.au/products/74ahct125-quad-level-shifter-3v-to-5v-74ahct125.md) |  | x1 | $3.15 | Out of stock |
| [830-Point Breadboard](https://littlebirdelectronics.com.au/products/830-point-breadboard.md) |  | x1 | $8.90 | In stock |
| [Resistor 330 Ohm 1/6th Watt PTH](https://littlebirdelectronics.com.au/products/resistor-330-ohm-1-6th-watt-pth.md) |  | x1 | $0.60 | In stock |
| [Jumper Wires Premium 6 M/M Pack of 50](https://littlebirdelectronics.com.au/products/jumper-wires-premium-6-m-m-pack-of-50.md) |  | x1 | $10.60 | In stock |
| [Capacitor Ceramic 0.1uF](https://littlebirdelectronics.com.au/products/capacitor-ceramic-0-1uf.md) |  | x1 | $0.65 | In stock |
| [Jumper Wires 7.8 F/M (10 Pack)](https://littlebirdelectronics.com.au/products/jumper-wires-7-8-f-m-10-pack.md) |  | x1 | $2.50 | In stock |

**Required Total:** $28.40

---

## Finding & Searching Products

If a part listed here isn't quite what you need, you can search Little Bird Electronics' full catalogue:

- **Search by keyword:** `GET https://littlebirdelectronics.com.au/products.md?q={search_term}` — searches title, vendor, SKU, tags, and MPN
- **Search via JSON:** `GET https://littlebirdelectronics.com.au/products.json?q={search_term}` — structured JSON results
- **Browse by collection:** `GET https://littlebirdelectronics.com.au/collections/{handle}.json` — products in a specific collection
- **Filter in-stock only:** `GET https://littlebirdelectronics.com.au/products.md?q={term}&in_stock=1`
- **Individual product detail:** `GET https://littlebirdelectronics.com.au/products/{handle}.md` — full specs, pricing, stock levels, variants

Search supports multi-word queries (AND logic). Examples:

- `https://littlebirdelectronics.com.au/products.md?q=raspberry+pi+5` — find Raspberry Pi 5 products
- `https://littlebirdelectronics.com.au/products.md?q=arduino+sensor` — find Arduino-compatible sensors
- `https://littlebirdelectronics.com.au/products.json?q=micro+bit` — find micro:bit products as JSON

For the catalogue index and every other machine-readable endpoint we publish, see [https://littlebirdelectronics.com.au/llms.txt](https://littlebirdelectronics.com.au/llms.txt).

---

*Source: [Light the Lorikeet with Raspberry Pi 5](https://littlebirdelectronics.com.au/projects/lorikeet-raspberry-pi-5) ([Markdown](https://littlebirdelectronics.com.au/projects/lorikeet-raspberry-pi-5.md))*
