iya mikiri

Upload: slamet-dhatank

Post on 16-Feb-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/23/2019 Iya Mikiri

    1/1

    The new dynamixel codes are as follows:

    Dynamixel Dxl(1); //Dynamixel on Serial1(USART1),

    //if you use 485 bus on sheild board -> Dynamixel Dxl(3); // on Serial3(UART3)

    void setup() {

    // Initialize the dynamixel bus:

    // baud rate index n=1 is 1Mbps refer to 2000000/(1+n)

    // 34 is 57600 bps

    Dxl.begin(1); //1Mbps

    }

    void loop() {

    Dxl.writeWord(1, 30, 0); //Turn dynamixel ID 1 to position 0

    delay(1000); // Wait for 1 second (1000 milliseconds)

    Dxl.writeWord(1, 30, 300);//Turn dynamixel ID 1 to position 300

    delay(1000); // Wait for 1 second (1000 milliseconds)

    }