This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
How to apply to your program
Doi Yusuke edited this page Oct 30, 2016
·
10 revisions
Reference README.md
Your program need that code onto top:
#include<ics3/ics>
Create ICS3 instance:
ics::ICS3 ics3 {"/dev/ttyUSB0", ics::Baudrate::RATE115200()}
// Create ICS3 instance to complete setting of communication
Get some Instance:
constexpr ics::ID id {1}; // Create servo ID is 1
auto target = ics::Angle::newDegree(40); // Create Angle is 40°
Use instances:
auto now_degree = obj.move(id, target); // the servo(id:1) move to 40°
// and return "now" position
More informetion: API Reference
You must use c++11 supported compiler.
You should compile with -lics3
.
g++ -std=c++11 -lics3 yourcode.cpp
You should specify ics3
on TARGET_LINK_LIBRARYS
for compiler to find libic3.
First, Linux need serial communication device mounted. you should mount your serial communication driver.
script/setup.sh
will mount device of serial UBS adapter series.
It is interactive shell script. You can mount a your device.
you can run the your program!