Check the code " Simple Servo Control " @ http://www.grayfuse.com/blog/?p=15
Use the servoPulse(PIN, ANGLE) function to control the servo motor.
ANGLE can take values between 0 and 255, but the real limits will be found by experimenting with your servo motor.
Your main function should look something like this:
void loop() { if (serialAvailable()) { myAngle = serialRead(); servoPulse(SERVOPIN, myAngle); } }
If you want to control more servos, you will have to build a communication protocol.
Tom
----- Original Message ----- From: "ad" alejoduque@gmail.com To: iamonthebeach@gmail.com Sent: Friday, June 02, 2006 6:31 PM Subject: pd to arduino
hi Thomas!,
i'm here trying to learn how to control a servo from within pd, i have found your post in the pd-list: http://elists.resynthesize.com/pd-list/2006/04/1592505/
that lead me to your cool tutorial: http://mrtof.danslchamp.org/AXIC but I will like to know if you could help me or share some code that will allow the arduino to send the right pulses and move 3 servos...
do you happen to have some code related to that problem? any idea where i can look to learn?
thanks, /a