As we build a second leg, Jayce has been hard at work in the brains of the hexbot. Our lookup tables aren't matched to the length of our first prototype leg, so we're doing a lot of trigonometry in MATLAB.
Our walk function consists of a series of points for the end of the leg to hit in sequence, in the form of an array of angles fed to the servos. To generate that array, we're using some code we found online translated into MATLAB. We input the desired path (moving directly backward at floor height until the maximum angle is reached, then lifting and returning to the initial position) and the script provides the servo angles at each point.
Our walk function consists of a series of points for the end of the leg to hit in sequence, in the form of an array of angles fed to the servos. To generate that array, we're using some code we found online translated into MATLAB. We input the desired path (moving directly backward at floor height until the maximum angle is reached, then lifting and returning to the initial position) and the script provides the servo angles at each point.