Arduino Obstacle Avoiding Robot?

I have made the chassis and everything for my robot, but to make my robot even go remotely forward, I have to code

And even then it goes in a big circle to the left. I have tried to code it less for the right motor but it just goes backwards.
Can you please tell me why this happens and how to fix it.

sort by: active | newest | oldest
Well, check how the wheels are turning !! Lift the robot on its back, so the wheels are upside down, and play with commands to the servos.

Put a little sticker or something on the edge of the wheel to make a timing mark.

Is a drive slipping ?

What happens to the wheel speed if you send -50 to a motor ? Does it run at half speed ? Should it ?

D5quar3 (author)  steveastrouk6 years ago
I tried to write less for one motor but it just makes that one turn backwards and could it be a problem with pwm? should I try to put it on different pins
Other thoughts:
Did you make these servos up yourself ?
Did you put a trimmer in place of the pot ?
Did you adjust the zero speed, with a "position demand" of zero from the Arduino with the trimmer ?

D5quar3 (author)  steveastrouk6 years ago
i bought them from Parralax, and I fixed it with the trimmer. i didn't know what they were for, but I tried it and it is going straight. thx
Don't forget to mark it as a Best Answer !
Can you point me to a link to your motor drive servo ? I am wondering if you have any control of speed of the motor at all ?

Ironic how kids don't meet a question head on but something you say makes a connection and leads them to a solution or fix and that is enough for them.

You and others like us, who want to know Why, as we build a library of causes and effects.
I wonder when kids get interested in details, maybe late teens as I don't remember.

I don't remember either, it was too damned long ago.....
iceng6 years ago
I'm not an Arduino programmer, is (-100) a valid number ??
A large left circle tells me the Left-Servo is going Forward but not as fast as the
That is why Steve wants you to check out the Wheels. A