3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

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
leftservo.write(-100);
rightservo.write(100);

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.

10 answers
sort by: active | newest | oldest
Jun 18, 2011. 7:24 PMsteveastrouk says:
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 ?

Jun 20, 2011. 12:23 AMsteveastrouk says:
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 ?

Steve
Jun 20, 2011. 1:22 AMsteveastrouk says:
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 ?

Steve
Jun 20, 2011. 1:28 PMiceng says:
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.

A
Jun 20, 2011. 1:37 PMsteveastrouk says:
I don't remember either, it was too damned long ago.....
Jun 20, 2011. 1:38 PMsteveastrouk says:
Don't forget to mark it as a Best Answer !
Jun 18, 2011. 9:11 PMiceng says:
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
Right-Servo.
That is why Steve wants you to check out the Wheels. A

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!