This module is designed to communicate with the PicoBorg Reverse via Rust and the embedded-hal traits.
See the PiBorg website at www.piborg.org/picoborgreverse for more details on the PicoBorgRev board.
Note: This is still a work in progress and the API should not be considered stable until the
The first step is to add
picoborgrev to your
[dependencies] picoborgrev = "0.1"
Then in your module you then need to import the crate:
extern crate picoborgrev; use picoborgrev::PicoBorgRev;
To create a new
PicoBorgRev controller you will need to supply an
extern crate linux_embedded_hal; use linux_embedded_hal::I2cdev; use std::path::Path; let device = I2cdev::new(Path::new("/dev/i2c-1")).expect("Unable to create i2c device");
Finally create a new
PicoBorgRev supplying the
let mut borg = PicoBorgRev::new(device).expect("Unable to create PicoBorgRev"); borg.set_led(true).unwrap();
The PicoBorgRev provides an easy way to interact with a PicoBorg Reverse
from rust. The communication is done via the