Compare commits

..

1 commit

Author SHA1 Message Date
8ae02e70a3 possible single pixel 2021-12-24 18:54:53 -05:00

View file

@ -5,7 +5,7 @@ use std::sync::{Arc, RwLock};
use std::thread;
use rs_ws281x::{RawColor, Controller, ControllerBuilder, ChannelBuilder, StripType};
pub const LED_SIZE: i32 = 450;
pub const LED_SIZE: usize = 450;
pub const BRIGHTNESS: u8 = 255;
fn main() {
@ -13,7 +13,7 @@ fn main() {
let lock = Arc::new(RwLock::new([p; LED_SIZE]));
let lock_c = Arc::clone(&lock);
let controller = ControllerBuilder::new()
let controller: Controller = ControllerBuilder::new()
.channel(ChannelBuilder::new()
.pin(18)
.count(LED_SIZE)
@ -24,7 +24,7 @@ fn main() {
.build();
thread::spawn(move || loop {
let lights = lock_c.read().unwrap();
run_lights(&controller, &lights);
run_lights(&lights);
});
let mut x: u8 = 0;
loop {