Registry / other / smart-leds

smart-leds

JSON →
library0.4.0rscratesunverified

A crate to use smart-LED device drivers (e.g., WS2812) in embedded Rust.

# Cargo.toml [dependencies] smart-leds = "0.4.0"
INSTALL
IMPORT
SIG · SMART-LEDS
S
smart-leds
otherrustv0.4.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.

SmartLedsWrite
✓ use smart_leds::SmartLedsWrite;

Write RGB data to a smart LED strip.

use smart_leds::SmartLedsWrite; use smart_leds::RGB8; fn main() { // Example with a mock driver; real usage requires a hardware driver. let mut led = smart_leds::MockSmartLeds::new(); let data = [RGB8::new(255, 0, 0), RGB8::new(0, 255, 0)]; led.write(data.iter().cloned()).unwrap(); }
Debug
Known issues
gotchaRequires a hardware-specific driver crate (e.g., `ws2812-spi`) for actual LED control.
fix
Add a driver crate like `ws2812-spi` and implement the `SmartLedsWrite` trait.
affects: >=0.1.0
Upgrade
Version history
0.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Bingbot
1
Resources
smart-leds — cargo add smart-leds · libregistry