Author
Topic: Servo Half Speed Code (Read 1168 times)

I was wondering if someone could look at my code to see if its correct for running servos (HS-625MG) at half speed. These are hacked for continuous rotation. The center is 1500 and the range is 600 usec to 2400 usec

Ok I just tested. I forgot to mention that I want this one servo (my commands are bit misleading, I will change them) to rotate clockwise and counterclockwise. so when tempbyte = 1, rotate clockwise. when tempbyte = 2 , rotate counterclockwise

When I tested with the code below, when 'leftwheel' was received, it just set to halfspeed, and then when 'right wheel' was received, it just went full speed. it might've been the other way around. so how would i set to rotate clockwise and counterclockwise. I thought thats what this was doing with the code below

Well I'm using PD so its defined in there. Center is 1500 range 600 - 2400 reverse direction not set

Also my servo is starting HIGH (starts constantly spinning at first). I used -124 and 124 and that changed direction, but -64 and 64 doesnt. Doesnt make sense. The servo should be off too because I wrote act_setSpeed(&servo,0); when no tempbyte received

Ok this is weird. It's like its not even responding to my code. No other values are being sent. I set the speed to zero if its not receiving a byte but it still keeps turning continuously. When I continuously send it a value 124, it tries to slow down, but just keeps spinning, I dont understand.

Would it have anything do with that I put a voltage regulator to step down my supply of 12v to a 5v the servo can handle?

Waittt I think I may have an idea of what it could be. When I was modifying the servo with this tutorial http://www.societyofrobots.com/actuators_modifyservo.shtmlI didn't set the servo to zero and glue down the pot. Could this be my problem? I dont want to take my servo apart for nothing so some verification would be nice. It seems like that would be the issue.