colorlight 0.1.0

A Rust library for detecting and sending frames to Colorlight 5A-75 LED receiver cards via Ethernet.
Documentation
  • Coverage
  • 46.15%
    6 out of 13 items documented0 out of 6 items with examples
  • Size
  • Source code size: 20.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • asamonik/colorlight.rs
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • asamonik

colorlight_rs

A Rust library for detecting and sending frames to Colorlight 5A-75 LED receiver cards via Ethernet.

Features

  • Detect receiver card
  • Send display frames (brightness, color temperature)
  • Send row-based pixel data frames (BGR pixel data)

Requirements

  • Rust (stable or later)
  • Elevated privileges (CAP_NET_RAW or equivalent)
  • Network interface connected to the Colorlight 5A-75 card

Installation

Add to Cargo.toml:

[dependencies]
colorlight_rs = { git = "https://github.com/your-repo/colorlight_rs.git", branch = "main" }

Example Usage

use colorlight_rs::ColorlightCard;

fn main() -> std::io::Result<()> {
    let interface_name = "eth0";
    let mut controller = ColorlightCard::open(interface_name)?;

    let info = controller.detect_receiver()?;
    println!("Receiver Info: {:?}", info);

    controller.send_display_frame(0xFF, 0xFF, 0x76, 0x06)?;

    let row_data_bgr: Vec<u8> = vec![0u8; 256 * 3];
    controller.send_row(0, &row_data_bgr)?;

    Ok(())
}

Acknowledgements

Many thanks to hkubota for his detailed blog post on the Colorlight 5A-75B protocol.

License

MIT