GithubHelp home page GithubHelp logo

ax-12a-servo-library's Introduction

Dynamixel AX-12A Robot Actuator

Datasheet

AX-12A Datasheet

Installing the library

  • Download zip file
  • Extract zip
  • Rename the folder : AX-12A-servo-library-master --> AX-12A-servo-library
  • Put the folder into your library folder (usually Documents/Arduino/libraries)

Using the library

To use the library, include header file located in the src folder.

#include "AX12A.h"

The library is provided with 4 Arduino examples :

  • Blink : simpliest example to blink the built-in LED
  • Move : example showing how to set a goal position
  • EndlessTurn : example of endlessTurn mode (wheel mode)
  • readRegister : debug AX-12A by printing all its registers

You have 4 lines to configure :

#define DirectionPin  (10u)
#define BaudRate      (1000000ul)
#define ID            (1u)
...
AX12A.begin(BaudRate, DirectionPin, &Serial);

DirectionPin is the GPIO used to change communication direction.

BaudRate corresponds to the baud rate used to communicate with the servo.

ID corresponds to the ID of the servo (from 0 to 253, 254 is used for broadcast).

&Serial refers to the serial port you want to use. It may have to be changed to &Serial1, &SerialUSB or other depending on the board package you use (variant files).

Change AX-12A settings by connecting the servo to a PC via USB2Dynamixel.

To do so, install Dynamixel Wizard included in the RoboPlus software suite.

Follow these instructions to connect and access the AX-12A settings.

Baud rate tests

We tested the library on differents boards at the most common baud rates.

Some boards cannot reach the desired baud rate :

Address 0x04 Baud rate Feather M0 Feather 32u4 nRF52 STM32L4
1 1000000 ok ok ok fail
3 500000 ok ok fail ok
4 400000 ok fail fail ok
7 250000 ok ok ok ok
9 200000 ok ok fail ok
16 115200 ok ok ok ok
34 57600 ok fail ok ok
103 19200 ok ok ok ok
207 9600 ok ok ok ok

ax-12a-servo-library's People

Contributors

jumejume1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ax-12a-servo-library's Issues

#include <HardwareSerial.h>

In <AX-12A.h> author forgot to #include <HardwareSerial.h> and it causes to few errors while compiling file. Maybe i did something wrong, but when I wrote this string, example code start to work fine.

no such file or directory

The library loaded into arduino ok, but compiling a simple example gives:
../../src/AX12A.h: No such file or directory

Position reading

I am reading the position while I move the servo as ENDLESS mode and it outputs from 0 to 1023 which is correct, but I can see that after it reach 1023 it returns 3-4 reading at 400 or 600 ( it is random ) then starts again from 0 ( which is correct ).

Is there an issue on the decoding of the position?

Specials, Instruction Set and Status Return Levels in AX12A.h file

Greetings,

I am going through your code for AX-12A dynamixel and I wish to write similar library for XC330-M288-T. I came across varible defination in file AX12A.h. After comments name Specials, Instruction Set and Status Return sections the varible that you declared, I cannot find it on e-manual. I want to know from where you used it. So I can also use it for XC motor.

Possible to enable unlock?

I wonder if there is a mode to unlock or disengaged the motor, like when it is not powered and you can move the wheel freely.

I couldnt find any combination of changing to wheel or remove torque that will make it "idle", maybe is not possible unless is not powered, do you have any clue if it can be done via code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.