dynamixel

package module
Version: v0.0.0-...-be9965c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2016 License: MIT Imports: 0 Imported by: 0

README

Dynamixel

Build Status Go Report Card GoDoc

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

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.

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
examples
protocol
v1
v2
ax
xl

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL