Skip to content

A cross-platform driver library for the Kraken Z series AIO coolers written in Rust.

License

Notifications You must be signed in to change notification settings

Huskehhh/zkraken-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zkraken-lib

A cross-platform driver library for the Kraken Z series AIO coolers written in Rust.

This project was made a lot easier referencing the work done by liquidctl, KrakenZPlayground and rcue

Example usage

use std::path::Path;

use color_eyre::Result;
use rusb::open_device_with_vid_pid;
use zkraken_lib::{NZXTDevice, PID, VID};

fn main() -> Result<()> {
    let mut handle = open_device_with_vid_pid(VID, PID).expect("No Kraken Z device found!");
    let nzxt_device = NZXTDevice::new(&mut handle, 270)?;

    let status = nzxt_device.get_status()?;
    let firmware_version = nzxt_device.get_firmware_version()?;

    println!("Status: {:?}", status);
    println!("Firmware version: {}", firmware_version);

    nzxt_device.set_fan_duty(80)?;
    nzxt_device.set_pump_duty(80)?;

    let image = Path::new("elmo.png");
    nzxt_device.set_image(image, 1, true)?;

    Ok(())
}

Disclaimer

I provide no guarantees or warranties for the code or the functionality provided. Use at your own risk.

About

A cross-platform driver library for the Kraken Z series AIO coolers written in Rust.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages