ajazz-rs

Crates.ioajazz-rs
lib.rsajazz-rs
version0.10.2
created_at2025-05-02 19:41:38.708492+00
updated_at2025-05-02 19:41:38.708492+00
descriptionHidApi driver for Ajazz devices
homepagehttps://github.com/streamduck-org
repositoryhttps://github.com/streamduck-org/ajazz
max_upload_size
id1658129
size93,534
Mikhael Khrustik (mishamyrt)

documentation

README

ajazz-rs

Rust library for interacting with Ajazz Stream Docks.

Example

use ajazz_rs::{new_hidapi, Ajazz};

// Create instance of HidApi
let hid = new_hidapi();

// List devices and unsafely take first one
let (kind, serial) = Ajazz::list_devices(&hid).remove(0);

// Connect to the device
let mut device = Ajazz::connect(&hid, kind, &serial)
    .expect("Failed to connect");

// Print out some info from the device
println!(
    "Connected to '{}' with version '{}'",
    device.serial_number().unwrap(),
    device.firmware_version().unwrap()
);

// Set device brightness
device.set_brightness(35).unwrap();

// Use image-rs to load an image
let image = image::open("no-place-like-localhost.jpg").unwrap();

// Write it to the device
device.set_button_image(7, image).unwrap();

// Flush
if device.updated {
    device.flush().unwrap();
}
Commit count: 0

cargo fmt