-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hi, I have a working Python code rendering 14 LEDs on GPIO 18, but I'm not able to make it running with Rust.
fn get_controller() -> rs_ws281x::Result<rs_ws281x::Controller> {
let controller = rs_ws281x::ControllerBuilder::new()
// .freq(800_000)
// .dma(10)
.channel(
0, // Channel Index
rs_ws281x::ChannelBuilder::new()
.pin(18) // GPIO 18 = PWM_CLK
.count(14) // Number of LEDs
.strip_type(rs_ws281x::StripType::Ws2812)
// .brightness(20) // default: 255
.build(),
)
.build()?;
Ok(controller)
}When calling this function I get: HwNotSupported error.
I tried recompiling the crate with a newer version of: https://github.com/jgarff/rpi_ws281x
git clone https://github.com/rpi-ws281x/rpi-ws281x-rust.git
cd rpi-ws281x-rust/
cargo build --target=aarch64-unknown-linux-gnu --releaseAnd setting the new path for the library:
#rs_ws281x = "0.5.1" # To control LEDs
rs_ws281x = { path = "../rpi-ws281x-rust", package = "rs_ws281x" }But the problem persists.
PD: I'm able to use it correctly on a Raspberry Pi Zero 2W.
Any clues? Thanks.
Metadata
Metadata
Assignees
Labels
No labels