Trossen Hexapod  Top Banner
Results 1 to 2 of 2

Thread: Help with servo read position

  1. #1
    Join Date
    Mar 2012
    Location
    Seattle, WA
    Posts
    2
    Rep Power
    0

    Help with servo read position

    Could someone help me read the position of a servo in the arduino environment using the ax12 and bioloid libraries. There is a convienent SetPosition function but i cant seem to use the GetRegister to read the position. I would appreciate any help in reading the servo position as a number between 0 and 1024.

  2. #2
    Join Date
    May 2008
    Posts
    2,230
    Images
    155
    Rep Power
    110

    Re: Help with servo read position

    So, the definition of ax12GetRegister is:

    Code:
    ax12GetRegister(int id, int regstart, int length);
    So, you want to read AX_PRESENT_POSITION_L & AX_PRESENT_POSITION_H (position is a 2-byte register), thus:
    Code:
    ax12GetRegister(1, AX_PRESENT_POSITION_L, 2);
    would read the position of servo with ID1.

    -Fergs
    Last edited by lnxfergy; 04-21-2012 at 04:38 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Question(s) Arbotix Pypose Read failed: servo id X
    By Ron in forum Robot Computers
    Replies: 20
    Last Post: 11-10-2011, 01:36 PM
  2. Question(s) On Bioloid: How to adjust the center position of the servo?
    By cybernetics in forum DYNAMIXEL & Robot Actuators
    Replies: 3
    Last Post: 06-22-2011, 01:55 PM
  3. Interesting Hack servo v3.00 - Get full PID position and speed control from your hobby servo
    By Antonb in forum Mechanics / Construction
    Replies: 20
    Last Post: 06-27-2010, 10:24 AM
  4. Question(s) Can Roboard capture (read) PWM from an RC receiver (RC Servo lib)?
    By John Elliott in forum Robot Computers
    Replies: 19
    Last Post: 01-10-2010, 07:50 AM
  5. PWM to Phidget Servo position function
    By Alex in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 08-13-2007, 05:02 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
  •