Go Down

Topic: Ping Robo code error (Read 3 times) previous topic - next topic

hugher256

Sorry after this also i cannot under stand.
One question-
How to make robot rotate 45 degree?
i have two servos.
OR
Make one servo stop to make other servo rotate?

dxw00d

Are you using normal servos, or continuous-rotation servos?

hugher256

continuous-rotation servos

dxw00d

Ok. They will be stopped when you set them to somewhere around 90 degrees. Settings higher or lower than the stop position will make them rotate in one direction or the other.

To make your robot rotate 45 degrees, assuming differential drive, you'll need to start the servos in opposite directions, and stop them after the robot has rotated as far as you want. If you have no wheel encoders, or any other way of getting rotational feedback, you'll have to experiment with the amount of time to run the servos.

hugher256

dxw00d ,please explain this with a code.

Go Up