pixoo

Crates.iopixoo
lib.rspixoo
version0.1.0
created_at2025-01-28 14:27:28.515263+00
updated_at2025-01-28 14:27:28.515263+00
descriptionInteract with Divoom Pixoo devices
homepage
repositoryhttps://github.com/RubixDev/pixoo
max_upload_size
id1533543
size2,878,958
Silas Groh (RubixDev)

documentation

README

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

# use std::str::FromStr;
# use bluetooth_serial_port::BtAddr;
# use pixoo::Pixoo;
// 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

# use std::str::FromStr;
# use bluetooth_serial_port::BtAddr;
# use pixoo::{Pixoo, 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

# use std::str::FromStr;
# use bluetooth_serial_port::BtAddr;
# use pixoo::{Pixoo, Brightness, mode::{LightMode, TimeFormat, ClockDesign}};
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();
Commit count: 1

cargo fmt