Skip to content

rust playground for the blink(1) led lights

License

Notifications You must be signed in to change notification settings

dadleyy/blinkrs

Repository files navigation

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.

About

rust playground for the blink(1) led lights

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages