Registry / other / ws2812-pio

ws2812-pio

JSON →
library0.9.0rscratesunverified

Driver for WS2812 smart LEDs using the RP2040's PIO peripheral.

# Cargo.toml [dependencies] ws2812-pio = "0.9.0"
INSTALL
IMPORT
SIG · WS2812-PIO
W
ws2812-pio
otherrustv0.9.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ws2812
use ws2812_pio::Ws2812;

Initializes a WS2812 LED driver on an RP2040 microcontroller.

use ws2812_pio::Ws2812; use rp_pico::hal::pio::PIOExt; fn main() { let mut pac = rp_pico::pac::Peripherals::take().unwrap(); let (mut pio, sm0, _, _, _) = pac.PIO0.split(); let ws = Ws2812::new(pio, sm0, pac.PIN_0); println!("WS2812 driver initialized"); }
Debug
Known issues
gotchaOnly works on RP2040-based microcontrollers (e.g., Raspberry Pi Pico).
fix
Ensure your target hardware is RP2040 and use the appropriate HAL.
affects: >=0.9.0
Upgrade
Version history
0.9.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources
ws2812-pio — cargo add ws2812-pio · libregistry