Go Down

Topic: source code to coordinate leg of hexapod (Read 747 times) previous topic - next topic


I am trying to make an autonomous hexapod 18 DOF using arduino megaboard. I am not using any simulator. I am struck with how to coordinate legs of hexapod. I calculated the angles which are required for a TIBIA to move up and down (ie. suppose for 130 degrees it reaches ground and 15 degrees it reaches horizontal) but i could not able to coordinate TIBIA, FEMUR and COAXIA motors simultaneously to make leg to coordinate for moving.I am using TRIPOID method for the movements.

this is the code which i used-->

#include <Servo.h>
Servo myservo[6][3];  // create servo object to control a servo
//[0] -tibia , [1] -femur , [2] -coxa motors
void setup() {

void loop() {
 //alternatively making hexapod stand at its place 
   myservo[0].write(130);// to make legs 0,2,4 DOWN
   myservo[1].write(15);// TO MAKE 1,3,5 UP
   myservo[0].write(15);//TO MAKE 0,2,4 UP
   myservo[1].write(130);// TO MAKE 1,3,5 down

Anyone please checkout this and help me in anyway possible.Suggest me with a source code of hexapod.


Dec 22, 2017, 03:58 pm Last Edit: Dec 22, 2017, 04:14 pm by vinceherman
If you are working on a hexapod, you need to read up on inverse kinematics.
Google it. Start reading.
Come back and ask questions after you read up on it.

Go Up