blinkrs

Crates.ioblinkrs
lib.rsblinkrs
version2.0.1
sourcesrc
created_at2019-09-27 19:41:55.213742
updated_at2022-02-12 02:12:02.41679
descriptionA small api for interacting with blink(1) LED lights.
homepagehttps://github.com/dadleyy/blinkrs
repositoryhttps://github.com/dadleyy/blinkrs.git
max_upload_size
id168195
size18,960
Danny Hadley (dadleyy)

documentation

README

blink(rs)

ci.img docs.img

A rust cli tool for controlling the blink(1) USB LED light.

Example

use std::boxed::Box;
use std::error::Error;

use blinkrs::{Blinkers, Message};

fn main() -> Result<(), Box<dyn Error>> {
    let blinkers: Blinkers = match Blinkers::new() {
        Ok(b) => b,
        Err(_e) => {
            println!("unable to find device");
            return Ok(())
        },
    };
    blinkers.send(Message::from("red"))?;
    blinkers.send(Message::from("off"))?;
    Ok(())
}

Contributing

See CONTRIBUTING.

Commit count: 22

cargo fmt