Go Down

Topic: Using Multiple Servos with Arduino (Read 79790 times) previous topic - next topic

outgoingbot

This is the updated code I use to control a 12 servo quad spider (quadruped) robot.

It takes a single 3*12 string over the serial port. (3chars * 12 motors) at 9600bps with no CR and no LF

FGTO

*I posted this before I realized the code on page one already existed. this is a much less elegant solution.this program would be simpler if i used commas in the command protocol.
however, this program 'steps' to the commanded value. so the servo sweeps into position with +1 or -1 steps. this may smooth out the servo movement.

here is a program i have to control 4 servos simultaneously from the serial console. feel free to improve the code as you see fit.
Here is a video of it in action: https://www.youtube.com/watch?v=hAFv7o5cG2o
This is for use with the serial console or you can change values from an input device, sensor, etc


The GUI you are using in the video for sending the degrees for each servo?
Is it made in Java?
Do have the code?

Go Up