Results 1 to 4 of 4

Thread: Dynamixel AX-12A, arbotix, xbee and LabView

  1. #1
    Join Date
    Jun 2013
    Location
    Ambato - Ecuador
    Posts
    7
    Rep Power
    21

    Question Dynamixel AX-12A, arbotix, xbee and LabView

    Hello everyone. My question is if I can build a biped robot using Dynamixel ax-12a servo motors, that are controlled by Arbotix card and if this card once controlled by labview?

    Thanks for your help.

  2. #2

    Re: Dynamixel AX-12A, arbotix, xbee and LabView

    You can probably change the controller on the Bioloid to be the Arbotix, and then talk to the Arbotix from Labview using the USB Explorer kit (USB -> Xbee -> Xbee -> Arbotix.) You'd have to develop some code on your own for the specifics there -- there's not a ready-to-run software kit that I know of.

  3. #3
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    97

    Re: Dynamixel AX-12A, arbotix, xbee and LabView

    Using the setup Jwatte posted above you can use the code example contained here http://forums.trossenrobotics.com/sh...4430#post44430 to control your robot using text. You can then use your labview VI to send messages to the through a xbee explorer. The format is screwy, but it is p (servo number two digets) # (servo position) It should really be the other way around, but you would have to edit the code to make right.

    DB

  4. #4
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    97

    Re: Dynamixel AX-12A, arbotix, xbee and LabView

    This flips it around so that the arbotix is looking for a # and when it sees one it starts formulating a message for the servo. So the message is "#(servo number 2 digits) p (servo position)

    Code:
     if(Serial.available() > 0) {
                // read the incoming byte
                startByte = Serial.read(); 
                // toggle LED so we know johnny5 is alive
                digitalWrite(0,HIGH-digitalRead(0));  
            } // end Serial.available()
            if(startByte == '#') {
                // get the command from the serial port
                while(Serial.available() < 8); // wait for data to arrive, do nothing      
                for(int i=0;i<8;i++){
                    cmd[i] = Serial.read();
                } //this creates an array that takes in the data from the serial     port      
                // convert command to two numbers
                int servoNum = 0;
                int servoPos = 0;
    
                servoNum = (cmd[0]-48)*10 + (cmd[1]-48);
                //builds the 2 diget servo Id number
                servoPos = (cmd[3]-48)*1000 + (cmd[4]-48)*100 + (cmd[5]-48)*10 + (cmd[6]-48);
                //builds the 4 diget goal position
                SetPosition(servoNum,servoPos);
                //sets servo position using 2 numbers one for servo, other for position.
                // debug
                Serial.print("cmd array:");
                for(int i=0;i<8;i++){
                    Serial.print(cmd[i]);
                }
                Serial.println("----");
                Serial.print("servoNum:");
                Serial.println(servoNum);
                Serial.print("servoPos:");
                Serial.println(servoPos);
    
            }// end if(startByte == '#')

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Programming arbotix controller via xbee
    By KingPin in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 03-05-2013, 10:11 AM
  2. Question(s) ArbotiX with LabVIEW: Low-level ArbotiX Commands?
    By vogonpoet42 in forum Software and Programming
    Replies: 2
    Last Post: 03-01-2013, 10:25 AM
  3. Question(s) where in the Arbotix AVR code is it talking to the XBEE serial port?
    By stephen.hazel in forum Arbotix, Microcontrollers, Arduino
    Replies: 5
    Last Post: 05-04-2012, 12:21 PM
  4. Question(s) Arbotix and Xbee Pro
    By Shredder in forum Arbotix, Microcontrollers, Arduino
    Replies: 9
    Last Post: 02-16-2011, 08:06 PM
  5. Question(s) ArbotiX, XBee and The FTDI Basic Breakout
    By Robonaut in forum Arbotix, Microcontrollers, Arduino
    Replies: 4
    Last Post: 02-27-2010, 08:22 PM

Tags for this Thread

Posting Permissions

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