rust_gpiozero 0.2.1

A library inspired by gpiozero written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
//! Display message in console when a Button is pressed

use rust_gpiozero::*;

fn main() {
    // Create a button which is attached to Pin 17
    let mut button = Button::new(17);
    button.wait_for_press(None);
    println!("button pressed");
}