You are on page 1of 17

Dynamixel library for Arduino . Version 1.2.

0

begin ()
Description Initialize the serial communication arduino . Syntax begin ( baudRate ); begin ( baudRate , DATACONTROL ) SoftSerial version begin ( baudRate , rxPin , TxPin ) begin ( baudRate , rxPin , TxPin , DATACONTROL ) Parameters baudRate - serial transmission rate in bps DATACONTROL - pin control for data transmission and recepcionde RxPin - pin for receiving data TxPin - pin for data transmission Example Dynamixel.begin (1000000) ; Dynamixel.begin (1000000 2) ; SoftSerial Version: Dynamixel.begin (1000000 , 2, 3 ) ; Dynamixel.begin (1000000 , 2 , 3 , 4 ) ;

ping ( )
Description Send a question to the servo motor status . Syntax ping ( ID) ;

reset () Description Return to the factory settings of the servomotor. Parameters ID .# Error found servomotor called Example Dynamixel. setId () Description Change the ID of the servomotor.ping ( 1) . Parameters ID . Syntax setId (ID .identification number of the servomotor newID .Parameters ID .reset ( 1) . Syntax reset ( ID) .identification number of the servomotor returns -1 If there was no response from the servomotor .# Error found servomotor called Example Dynamixel. newID ).identification number of the servomotor returns -1 If there was no response from the servomotor .new servomotor ID .

setID ( 1. baudRate ). Position) .# Error found servomotor called Example Dynamixel. 2 ) . Syntax setBD (ID . setBD ( ) Description Change the Baud Rate of the servomotor.setBD (1.servo position 0 to 1023 ( 0 to 300 degrees) .identification number of the servomotor buadRate .identification number of the servomotor Position .serial transmission speed in bps returns -1 If there was no response from the servomotor . Syntax move ( ID . Parameters ID .# Error found servomotor called Example Dynamixel. move () Description Move the actuator to the position indicated.returns -1 If there was no response from the servomotor . 115200 ). Parameters ID .

identification number of the servomotor Position .# Error found servomotor called Example Dynamixel.servo position 0 to 1023 ( 0 to 300 degrees) .speed that will move the servo 0 to 1023 returns -1 If there was no response from the servomotor . 512) . Parameters ID . movespeed () Description Move the actuator to the position indicated airspeed .returns -1 If there was no response from the servomotor .# Error found servomotor called Example Dynamixel. 1023 ). moveRW ( ) Description Save the instruction that moves the actuator to the position indicated. Syntax moveRW (ID .moveSpeed (1. Parameters ID .servo position 0 to 1023 ( 0 to 300 degrees) Speed . Position.identification number of the servomotor Position . Syntax movespeed (ID . 512 . Position) .move (1. Speed) .

action () Description Executes the instruction stored in the servomotor. moveSpeedRW ( ) Description Save the instruction that moves the actuator to the position indicated airspeed .returns -1 If there was no response from the servomotor . Syntax moveSpeedRW (ID .speed that will move the servo 0 to 1023 returns -1 If there was no response from the servomotor . 512) .moveSpeedRW (1. 512 .identification number of the servomotor Position . Syntax action () . Position.servo position 0 to 1023 ( 0 to 300 degrees) Speed .# Error found servomotor called Example Dynamixel. Speed) .moveRW (1. Parameters none . 1023 ).# Error found servomotor called Example Dynamixel. Parameters ID .

ON) .# Error found servomotor called Example Dynamixel. Parameters ID . Syntax turn ( ID .direction in which to rotate ( RIGTH or LEFT) Speed . setEndless ( ) Description Enables or disables continuous mode servomotor rotation .action ( ) .setEndless (1.# Error found servomotor called Example Dynamixel. Side.identification number of the servomotor Status .speed that will move the servo 0-1020 . turn () Description Servomotor rotates to the right or left and the speed indicated only if in continuous rotation mode . Speed) . Status ). Parameters ID .returns -1 If there was no response from the servomotor . Syntax setEndless (ID .on or off the Endless ( ON or OFF) mode returns -1 If there was no response from the servomotor .identification number of the servomotor Side .

Syntax LEDStatus (ID . LEDStatus () Description Turns the LED on the back of the servomotor. 1000) . ON) .# Error found servomotor called Example Dynamixel.on or off the touch (ON or OFF) returns -1 If there was no response from the servomotor . Parameters ID . Parameters ID .turn (1. Status ).returns -1 If there was no response from the servomotor . Status ).identification number of the servomotor Status . torqueStatus ( ) Description Enables or disables the torque on the servomotor.torqueStatus ( 1 . LEFT.identification number of the servomotor Status .# Error found servomotor called Example Dynamixel. Syntax torqueStatus (ID .on or off (ON or OFF) LED .

80 ) . CW .maximum angle against clockwise .# Error found servomotor called Example Dynamixel. Parameters ID . setTempLimit ( ) Description Configures a maximum operating temperature of the servomotor. Temperature) . CCW ).# Error found servomotor called Example Dynamixel.ledStatus (1. Syntax setTempLimit (ID .identification number of the servomotor Temperature . ON) .returns -1 If there was no response from the servomotor .the maximum temperature to which the servomotor work returns -1 If there was no response from the servomotor .identification number of the servomotor CW . setAngleLimit ( ) Description Sets a maximum angle CW and CCW operating servomotor. Syntax setAngleLimit (ID .maximum angle to clockwise CCW .setTempLimit (1. Parameters ID .

setMaxTorque ( ) Description Sets a maximum torque on the actuator . maxVoltage ).# Error found servomotor called Example Dynamixel.servomotor maximum torque ( 0-1023 ) .identification number Maxtorque .setVoltageLimit (1.returns -1 If there was no response from the servomotor . setVoltageLimit ( ) Description Set a minimum and maximum operating voltage on the actuator .minimum operating voltage of the servomotor maxVoltage maximum operating voltage of the servomotor returns -1 If there was no response from the servomotor . Maxtorque ). Parameters ID . 160 ) . Syntax setMaxTorque (ID . 70 .identification number of the servomotor minVoltage .setAngleLimit (1.# Error found servomotor called Example Dynamixel. Parameters ID . minVoltage . Syntax setVoltageLimit (ID . 45 ) . 45 .

setMaxTorque (1. 2 ) . setSRL ( ) Description Sets the Status Return Level of servomotor.returns -1 If there was no response from the servomotor . (2 Return all) returns -1 If there was no response from the servomotor .time information return (0-255 ) * 2us .identification number of the servomotor RDT .setSRL ( 1. RDT ).# Error found servomotor called Example Dynamixel.identification number of the servomotor SRL . ( read Return 1 ) .(0 Return none). 1023 ) . SRL ). Syntax setSRL (ID . Parameters ID . Parameters ID . setRDT ( ) Description Return Delay Time Sets the servomotor .# Error found servomotor called Example Dynamixel. Syntax setRDT (ID .

Parameters ID .setRDT (1. setShutdownAlarm ( ) Description Set the alarm off the booster.identification number of the servomotor shutdownAlarm .setLEDAlarm ( 1 .identification number of the servomotor LEDAlarm . setLEDAlarm ( ) Description Set the alarm LED servomotor. Syntax setShutdownAlarm (ID . Parameters ID . 255 ) . LEDAlarm ).# Error found servomotor called Example Dynamixel.shutdown .alarm LED ( 0-255 ) returns -1 If there was no response from the servomotor .# Error found servomotor called Example Dynamixel. Syntax setLEDAlarm (ID . 255 ) . shutdownAlarm ).returns -1 If there was no response from the servomotor .

CCW Compliance Margin ( 0-255 ) returns -1 If there was no response from the servomotor .setShutdownAlarm (1. setCMargin ( ) Description Compliance Margin Sets the servomotor . 255 ) . Parameters ID .identification number of the servomotor CWCS . Syntax setCSlope (ID .# Error found servomotor called Example Dynamixel.alarm ( 0-255 ) returns -1 If there was no response from the servomotor . CCWCS ).setCMargin ( 1. 1 . Parameters ID .CCW Compliance Slope ( 0-255 ) .CW Compliance Slope ( 0-255 ) CCWCS . setCSlope ( ) Description Set the servomotor Compliance Slope . 1) .# Error found servomotor called Example Dynamixel. Syntax setCMargin (ID . CCWCM ). CWCS . CWCM .identification number of the servomotor CWCM .CW Compliance Margin ( 0-255 ) CCWCM .

identification number of the servomotor Punch .setPunch (1.identification number of the servomotor .setCSlope (1. 1023 ) . Punch ). Parameters ID .# Error found servomotor called Example Dynamixel.current in the servomotor ( 0-1023 ) returns -1 If there was no response from the servomotor . Parameters ID .# Error found servomotor called Example Dynamixel. moving () Description Check or read if the servomotor is moving. setPunch ( ) Description Punch Sets the maximum current or servomotor. 64 ) .returns -1 If there was no response from the servomotor . 64. Syntax moving (ID ) . Syntax setPunch (ID .

identification number of the servomotor returns -1 If there was no response from the servomotor . Syntax lockRegister (ID ) .# Error found servomotor called -0 If the actuator is not in motion -1 If the servo is still moving Example var = Dynamixel.RWStatus int ( 1) .moving int ( 1) . lockRegister ( ) Description Blocks 24 to 35 records of the servomotor. RWStatus ( ) Description Lee REG_WRITE state servomotor .identification number of the servomotor . Syntax RWStatus (ID ) . Parameters ID . Parameters ID .# Error found servomotor called 0 if the servo does not have a saved instruction 1 if the actuator has a saved statement Example var = Dynamixel.returns -1 If there was no response from the servomotor .

readTemperature ( ) Description Reads the internal temperature of the servomotor .readTemperature int ( 1 ) .identification number of the servomotor returns -1 If there was no response from the servomotor .lockRegister ( 1) . Syntax readVoltage (ID ) . Parameters ID .identification number of the servomotor .returns -1 If there was no response from the servomotor . readVoltage ( ) Description Read the supply voltage of the servomotor. Syntax readTemperature (ID ) . Parameters ID .# Error found servomotor called Example Dynamixel.# Error found servomotor called # Internal temperature of the servomotor Example var = Dynamixel.

Syntax readPosition (ID ) . Parameters ID .# Error found servomotor called # Supply voltage servomotor Example var = Dynamixel. readSpeed ( ) Description Read the rpm of the servomotor.returns -1 If there was no response from the servomotor . readPosition ( ) Description Reads the position in which the actuator is located .readVoltage int ( 1) .# Position of the servomotor Example var = Dynamixel. Syntax readSpeed (ID ) .readPosition int ( 1) .identification number of the servomotor .identification number of the servomotor returns -1 If there was no response from the servomotor .# Error found servomotor called . Parameters ID .

# Error found servomotor called . .# Speed in rpm of the servomotor Example var = Dynamixel.returns -1 If there was no response from the servomotor . Parameters ID .readSpeed int ( 1) . readLoad ( ) Description Read the current used by the servomotor.readLoad int ( 1) .# Used by current servomotor Example var = Dynamixel.identification number of the servomotor returns -1 If there was no response from the servomotor .# Error found servomotor called . Syntax readLoad (ID ) .