Expand description
§Pixoo
A Rust crate for interacting with Divoom Pixoo devices.
The crate is pretty basic in its functionality and does not support all features by far, but I think the most important ones are covered.
Tested only on Linux. I have no idea whether this works on Windows or Mac, and if it doesn’t and you need it to, go fix it yourself.
§Examples
Before running any code, make sure you have the Pixoo device paired in your Bluetooth settings.
More extensive examples can be found in the
examples
directory.
Run them with:
cargo run --release --examples=<name> <MAC-address>
§Displaying an Image
// you can either connect to a specific MAC address or try to find the device automatically
//let mut pixoo = Pixoo::find(Duration::from_millis(100)).unwrap();
let mut pixoo = Pixoo::connect(BtAddr::from_str("11:75:58:35:2B:35").unwrap()).unwrap();
let img = image::open("examples/rubix.png").unwrap();
pixoo.set_image(&img).unwrap();
§Adjusting the Brightness
let mut pixoo = Pixoo::connect(BtAddr::from_str("11:75:58:35:2B:35").unwrap()).unwrap();
pixoo.set_brightness(Brightness::MAX).unwrap();
§Display the Time
let mut pixoo = Pixoo::connect(BtAddr::from_str("11:75:58:35:2B:35").unwrap()).unwrap();
pixoo.set_brightness(Brightness::new(30).unwrap()).unwrap();
pixoo.set_mode(LightMode::Env {
time_format: TimeFormat::TwelveHour,
clock_design: ClockDesign::Digital,
show_divoom: false,
show_weather: false,
show_temp: false,
show_date: true,
color: [255, 120, 0],
}).unwrap();
Modules§
Structs§
- Pixoo
- A connection to a Pixoo device
Enums§
- Pixoo
Find Error - The error type for finding a Pixoo device
Constants§
- DISPLAY_
SIZE - The size of the Pixoo display in pixels