Expand description
Control Barobo Linkbots with Rust
This library is a thin wrapper around Barobo’s C++ Linkbot library. It provides a way to control Linkbot peripherals and get data from a Linkbot with Rust.
You can find more information about Linkbots at https://barobo.com .
§Installation
This crate requires the “liblinkbot” libraries to be installed. On Ubuntu, you can install liblinkbot with the following commands:
wget http://repo.barobo.com/barobo.public.key -O - | sudo apt-key add -
sudo add-apt-repository "deb http://repo.barobo.com/ xenial main"
sudo apt-get update
sudo apt-get install liblinkbot
§Examples
Following is a simple example which connects to robot “ZRG6” and moves all of its motors in the positive direction by 90 degrees. After the first motion is completed, it moves all of its motors in the negative direction by 180 degrees.
extern crate linkbot;
use linkbot::Linkbot;
fn main() {
let mut l = Linkbot::new("ZRG6").unwrap();
l.move_motors(7, 90.0, 90.0, 90.0);
l.move_wait(7);
l.move_motors(7, -180.0, -180.0, -180.0);
}
Structs§
- Linkbot
- An object representing a Linkbot.
Enums§
- Button
- Linkbot button
- Button
State - Linkbot button state