First of all, you didn't include the whole program, there are no #pragma lines in here. Next time, make sure you put them in too. Second, make sure you surround your code with [ code] [/ code] tags (without the spaces). It will make your code much more readable.There is nowhere in your robot where you tell it to stop when you're a certain distance away from the object. I have a few questions for you, and you really need to think about them:* What happens when the object is straight in front (5).* What happens when the object is to the left (ir seeker returns 1 or 9, depending on how the sensor is mounted)* What happens when it's a little bit to the right (ir seeker returns 3 or 7, depending on how the sensor is mounted)

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum