use rs_ws281x::RawColor; use rs_ws281x::Controller; use rs_ws281x::WS2811Error; use std::{thread, time}; pub fn run_lights(controller: &mut Controller, values: &[RawColor; crate::LED_SIZE]) -> Result<(), WS2811Error> { // println!("Value: {:?}", strip[0]); thread::sleep(time::Duration::from_secs(1)); let channels: Vec = controller.channels(); let mut strip = controller.leds_mut(channels[0]); for i in 0..strip.len() { strip[i] = values[i]; } controller.render(); controller.wait() }