WS2812 library for the Pico (RP2040 & RP2350), written in pure C.
Features a clean, simple interface, support for multiple color modes, and zero external dependencies.
There are already plenty of libraries for driving WS2812 addressable LEDs on the Pico. Unfortunately, most of them either lack support, require C++, depend on Arduino, or are missing key features.
In my humble opinion, no one should have to switch to C++ just to drive an LED, so this library takes the best parts of other implementations and wraps them into a neat, ready-to-use package for your C (or C++) projects.
Add to your project via FetchContent in your CMakeLists.txt:
include(FetchContent)
FetchContent_Declare(pico_ws2812
GIT_REPOSITORY "https://github.com/sonodima/pico-ws2812"
GIT_TAG "main")
FetchContent_MakeAvailable(pico_ws2812)
target_link_libraries(your_target PRIVATE pico_ws2812)Browse the Docs [ /s ]
cmake -S example -B build -DPICO_BOARD=adafruit_feather_rp2040
cmake --build buildThis work is released under the MIT license. A copy of the license is provided in the LICENSE file.