Society of Robots - Robot Forum
Software => Software => Topic started by: rox2007 on January 18, 2008, 09:33:18 PM
-
please
-
please post more about your problem
-
i have two servos that i would like to control with PWM because i cant seem to get it right anyother way.
-
You like to be secretive, don't you? We can't guess your setup, you have to explain more.
If you are using Arduino, there is a library that uses Timer1 to generate PWM servo pulses. http://www.arduino.cc/playground/ComponentLib/Servotimetimer1 (http://www.arduino.cc/playground/ComponentLib/Servotimetimer1)
If you are using $50 robot there is this tutorial: http://mil.ufl.edu/~achamber/servoPWMfaq.html (http://mil.ufl.edu/~achamber/servoPWMfaq.html)
-
i guess rox2007 is referring to his problem posted here:
http://www.societyofrobots.com/robotforum/index.php?topic=2917.0
-
yep, would really appreciate any help
-
If you are using $50 robot there is this tutorial: http://mil.ufl.edu/~achamber/servoPWMfaq.html (http://mil.ufl.edu/~achamber/servoPWMfaq.html)
how would i modify it for a hacked servo
this tutorial is helpful. it actually leads to this
http://mil.ufl.edu/~achamber/servoPWMwCodeVision.html
but the codevision i have, which is the new one does not look like what was described in that tutorial
-
how would i modify it for a hacked servo
A modified servo for continuous rotation is controlled exactly the same as a regular servo. If you send a pulse between 1 ms to 1.5 ms, the servo will rotate counterclockwise at a different speed, the 1.5 ms pulse makes the servo stop and a pulse between 1.5 ms and 2 ms will make the servo rotate clockwise at a different speed. It all depends on servo quality. Some servos just rotate at the maximum speed no matter what pulse you give.
-
sorry i didnt say this earlier, but it worked...:)
thanks alot for the link. to use it with an atmega 168 you need the file incompato.h, i found it on google.