https://github.com/adammck/dynamixel
Go interface to Dynamixel servos
https://github.com/adammck/dynamixel
dynamixel go servo
Last synced: 7 months ago
JSON representation
Go interface to Dynamixel servos
- Host: GitHub
- URL: https://github.com/adammck/dynamixel
- Owner: adammck
- License: mit
- Created: 2014-07-02T02:44:14.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-12-16T02:59:44.000Z (over 9 years ago)
- Last Synced: 2025-02-27T04:46:30.465Z (over 1 year ago)
- Topics: dynamixel, go, servo
- Language: Go
- Homepage:
- Size: 113 KB
- Stars: 5
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dynamixel
[](https://travis-ci.org/adammck/dynamixel)
[](https://goreportcard.com/report/github.com/adammck/dynamixel)
[](https://godoc.org/github.com/adammck/dynamixel)
This packages provides a Go interface to Dynamixel servos. It's tested against
[AX-12] [ax] and [XL-320] [xl] servos (because I am a cheapskate), but should
work with other models.
## Example
```go
package main
import (
"log"
"github.com/jacobsa/go-serial/serial"
"github.com/adammck/dynamixel/network"
"github.com/adammck/dynamixel/servo/ax"
)
func main() {
options := serial.OpenOptions{
PortName: "/dev/tty.usbserial-A9ITPZVR",
BaudRate: 1000000,
DataBits: 8,
StopBits: 1,
MinimumReadSize: 0,
InterCharacterTimeout: 100,
}
serial, err := serial.Open(options)
if err != nil {
log.Fatalf("error opening serial port: %v\n", err)
}
network := network.New(serial)
servo, err := ax.New(network, 1)
if err != nil {
log.Fatalf("error initializing servo: %v\n", err)
}
err = servo.Ping()
if err != nil {
log.Fatalf("error pinging servo: %v\n", err)
}
err = servo.SetGoalPosition(512)
if err != nil {
log.Fatalf("error setting goal position: %v\n", err)
}
}
```
More examples can be found in the [examples] [examples] directory of this repo.
## Documentation
The docs can be found at [godoc.org] [docs], as usual.
The API is based on the Dynamixel [v1 protocol] [proto] docs.
## License
[MIT] [license], obv.
## Author
[Adam Mckaig] [adammck] made this just for you.
[ax]: http://support.robotis.com/en/product/dynamixel/ax_series/dxl_ax_actuator.htm
[xl]: http://support.robotis.com/en/product/dynamixel/xl-series/xl-320.htm
[docs]: https://godoc.org/github.com/adammck/dynamixel
[examples]: https://github.com/adammck/dynamixel/tree/master/examples
[proto]: http://support.robotis.com/en/product/dynamixel/ax_series/dxl_ax_actuator.htm#Control_Table
[license]: https://github.com/adammck/dynamixel/blob/master/LICENSE
[adammck]: http://github.com/adammck