Results 1 to 3 of 3

Thread: Arbotix-M sketch for dynamixel AX-12A's

  1. Arbotix-M sketch for dynamixel AX-12A's

    New to robotics - I have two AX-12A servos set up as 1 & 2 and an Arbotix-M board. I would like a simple sketch that uses one servo as the master and the other to duplicate the motion of the first. I would be moving servo 1 by hand and would like servo 2 to duplicate the movements, similar to this youtube video: http://www.youtube.com/watch?v=u7nNgsW1_No Any ideas?

  2. #2
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,300
    Images
    27
    Rep Power
    278

    Re: Arbotix-M sketch for dynamixel AX-12A's

    Untested, but should be close.
    Code:
    #include <ax12.h>
    
    #define MASTER_SERVO 1
    #define SLAVE_SERVO 2
    
    void setup()
    {
        // setup the arbotix's dynamixel library
        ax12Init(1000000);
        // turn off torque of the master servo so that we can move it around
        Relax(MASTER_SERVO);
    }
    
    void loop()
    {
        while (1)
        {
            // get position of master servo
            int posit = GetPosition(MASTER_SERVO);
            // set position of slave servo
            SetPosition(SLAVE_SERVO, posit);
            // delay a bit so we do not swamp servos with packets
            delay(50);
        }
    }
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh
    more bleh

  3. Re: Arbotix-M sketch for dynamixel AX-12A's

    Thank you very much, exactly what I needed! Dynamixels are great!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 18 Dynamixel Ax-12A with ArbotiX/Arduino - How to connect the dynamixel?
    By Snuuq in forum Arbotix, Microcontrollers, Arduino
    Replies: 20
    Last Post: 02-14-2014, 11:29 AM
  2. Question(s) Dynamixel AX-12A, arbotix, xbee and LabView
    By kanuto in forum Humanoids, Walkers & Crawlers
    Replies: 3
    Last Post: 06-04-2013, 10:56 PM
  3. Question(s) controlling 6 ax-12a's with an arduino Mega
    By mlerner in forum DYNAMIXEL & Robot Actuators
    Replies: 6
    Last Post: 02-01-2013, 05:29 PM
  4. MINI Robocontroller sketch issues
    By draikani in forum Software and Programming
    Replies: 4
    Last Post: 06-11-2011, 06:53 PM
  5. Question(s) Controlling Dynamixel with Arbotix Commander
    By Buell24 in forum Software and Programming
    Replies: 9
    Last Post: 01-04-2011, 12:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •