Skip to content

A controller library for PiBorg's PicoBorg Reverse motor driver board designed for use with the Raspberry Pi

License

Notifications You must be signed in to change notification settings

marvin-rs/picoborgrev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Latest Version Latest Docs

picoborgrev

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.

Important: This is still a work in progress and the API should not be considered stable until the 1.0 release.

Usage

The first step is to add picoborgrev to your cargo.toml file:

[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 embedded-hal implementation such as linux-embedded-hal:

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 I2C implementation:

let mut borg = PicoBorgRev::new(device).expect("Unable to create PicoBorgRev");
borg.set_led(true).unwrap();

Examples

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A controller library for PiBorg's PicoBorg Reverse motor driver board designed for use with the Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages