rust_gpiozero
A simple interface to GPIO devices with Raspberry Pi.
This library is based on GPIOZero library.
Note: This is a work in progress. The library will eventually support embedded-hal
based drivers
The idea is to get started with physical computing using Rust with little coding by hiding the underlying complexity.
The library uses BCM Pin numbering
Example : Blinking an LED
extern crate rust_gpiozero;
use *;
Example : Wait for a Button Press
extern crate rust_gpiozero;
use *;
Compare this to using the crate sysfs_gpio
to blink an LED on the Raspberry Pi :
extern crate sysfs_gpio;
use ;
use sleep;
use Duration;
Install/Use
To use rust_gpiozero
, first add this to your Cargo.toml:
[]
= "0.1.0"
Features
The following features are planned :
- Support for
linux-embedded-hal
- Support for common devices such as Accelerometer, Temperature sensors, etc