obstacle avoiding robot

hi!
i have made an obstacle avoiding robot but i m facing problems regarding its motion
robot is moving in circle and its not moving in forward direction what should i do? thanks

Start debugging.
Good luck.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

salehafarooq:
robot is moving in circle and its not moving in forward direction what should i do?

I can think of three reasons why a obstacle avoiding robot might turn in a circle:

  1. You may have the programming wrong and have told it to turn when it doesn't detect an obstacle.
  2. Your obstacle detector may be reporting obstacles even when they aren't there. This could be a bad detector or bad wiring.
  3. Your sketch may be interpreting the input incorrectly and acting as if an obstacle was present even when it isn't.

Hi,
If you are using two drive motors, one left and one right.
When you want the robot to go forward, one of the motors, because it is facing opposite to the other will need to run in the opposite direction.
All you will need to do is swap over the two wires on one of the motors to make both run in same direction.

BUT FIRST;

Have you got some simple code that just drives the motors so you can check direction.

Tom.... :slight_smile: