The first function, and most basic, is theone that calculates the angles through inverse kinematics so that each legreaches the given position. This is the reference sistem of each leg defined for the movements: The program works jus for the legs, but if you have enough PMW pins you can make them work! The program is separated in a few blocks, so that is easier to read. (AND DON'T FORGET TO CONECT BOTH GND FROM THE ARDUINO AND THE EXTERNAL SOURCE!). The conecction is the same as a normal servo control, with the difference that as there are a lot of servos, you won't be able to power them with the Arduino, so you will need to get and external source. And then with the orientation of the final point (ankle) defined, I am able to define the position of the ankle wanted according to the action desired (either balance over one leg or to level the robot body). Mainly what I did is to solve the inverse kinematics of the robot from it's waist until the ankle.
#Hitec robonova 1 humanoid robot pdf
If for anyone is easier to read the pdf I uploaded it's report here, and most of the mathematics is explained over there : The ROBONOVA-1 is a human body robot composed with 16 servos, here I leave you it's manual: This is my first project with Arduino, so probably you will find some mistakes, hope to hear and learn from them. Didn't have enough time to make it do more stuff, but I hope the programation is useful for anyone trying to make something similar. This work has been my final project for a subject at the university.