Rust library for interacting with the Pimoroni Unicorn HAT HD.
The docs can be found online at docs.rs, or be built using cargo doc
.
Add unicorn_hat_hd
to your Cargo.toml
.
toml
[dependencies]
unicorn_hat_hd = "0.1"
Add unicorn_hat_hd
to your crate root.
rust
extern crate unicorn_hat_hd;
Create a default UnicornHatHd
, and start setting some pixels.
```rust use unicornhathd::UnicornHatHd;
pub fn main() { let mut hathd = UnicornHatHd::default(); loop { for x in 0..16 { for y in 0..16 { hathd.setpixel(x, y, 255, 255, 255); hathd.display().unwrap(); hathd.setpixel(x, y, 0, 0, 0); } } } } ```
Copyright (c) 2017 Jacob Helwig. Released under the BSD license.