# Robot malfunction

#### nanobyte

Joined May 26, 2004
120
My problem is I am trying to make a "Robot"(just a circle with a line inside of it) on Borland C++ Builder 6 that sees a goal(another circle) and once it sees the goal moves towards it. The robot will know it is facing the goal when its eye(the line going through it is pointing at the center of the goal (there is about a two degree margin for error). Instead of stoping and moving towards the goal when facing it the Robot just keeps turning. This is a project for school that is worth a test grade and the dateline is coming soon. Please somebody help or my a$% will be grass! Take a look at my code and tell me what you think. Any advice or better yet examples (like code) would be greatly appreciated. :unsure: #### cyberhehe Joined Oct 6, 2004 61 Originally posted by nanobyte@Jan 29 2005, 06:25 AM My problem is I am trying to make a "Robot"(just a circle with a line inside of it) on Borland C++ Builder 6 that sees a goal(another circle) and once it sees the goal moves towards it. The robot will know it is facing the goal when its eye(the line going through it is pointing at the center of the goal (there is about a two degree margin for error). Instead of stoping and moving towards the goal when facing it the Robot just keeps turning. This is a project for school that is worth a test grade and the dateline is coming soon. Please somebody help or my a$% will be grass! Take a look at my code and tell me what you think. Any advice or better yet examples (like code) would be greatly appreciated. :unsure:
[post=4873]Quoted post[/post]​
Hi Nano,

Sorry for this comment, havent look into the code that deep but one thing I noticed is that it will be good if you can put more comments, descriptions of your routines/ modules so everyone can easily understand each stuff you are doing, its purpose. Good documentation of a code helps a lot and allows many to understand it easily, thereby may help you to fix the problem easily.

Cyber