Skip to content
eelstretchingPublic

About

A simple library for using LED strips with the Raspberry Pi Pico

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

PicoLEDs

Steve's LED library for the RP2040/RP2350: the parallel PIO renderer, Canvas/Animator, the animations, fonts and colors, plus the example programs in examples/. MegaTree, OfficeSign and the rest build against src/ from a checkout next to theirs.

The default board is the Pico 2 W (build/). The LED processor board has its own build in build-pb/, below.

Building for the processor board (command line)

1. Get the latest. The processor board's board header comes from the led-processor-board checkout, which has to sit next to this one (PicoLEDs/ and led-processor-board/ side by side). From the PicoLEDs directory:

for r in . ../led-processor-board; do git -C $r pull; done

2. Configure (the first time, and again after a pull that changes a CMakeLists.txt; it's harmless to run every time):

cmake --preset processor-board

That makes build-pb/ with PICO_BOARD=led_processor_board. With the VS Code Pico extension installed (~/.pico-sdk), cmake finds the SDK and the Arm compiler by itself. Without it, put PICO_SDK_PATH=/path/to/pico-sdk (2.3.x) in front. Without the preset, the same thing longhand:

cmake -S . -B build-pb -G Ninja -DPICO_BOARD=led_processor_board \
      -DPICO_BOARD_HEADER_DIRS=$PWD/../led-processor-board/firmware/boards

(PICO_BOARD_HEADER_DIRS has to be an absolute path, hence the $PWD.)

3. Build what you need (or every example with plain ninja -C build-pb):

ninja -C build-pb StripTest PinStrip

4. Flash over USB, with the board plugged in and running:

picotool load -f -x build-pb/examples/StripTest/StripTest.uf2

The .uf2s land under build-pb/examples/<folder>/. The ones that know about the processor board:

Target What it does
StripTest Rotating color bands on all 32 outputs (GP0-31). Type a number and Enter to light that many pixels per strand.
PinStrip One strand on any pin (p <pin>, n <count>, ? for help), e.g. the topper on GP35.

The rest of the examples build for the processor board too, but were written for a Pico on the perfboard, so check their pins first.

Building for the Pico 2 W

cmake --preset pico2_w        # -> build/
ninja -C build IndoorTree

About

A simple library for using LED strips with the Raspberry Pi Pico

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages