I have read the FAQs and i have learned a lot of troubleshooting techniques. I have read the annotations on main.c but then realized I have no idea how all the other sub programs fit in. I do understand what height to put the sensors and how to block out reflections but I don’t know whether to put the sensors on the front middle or back. I cant find anything on what makes the robot move forward turn or stop in the FAQs
How about this question:
What makes the robot move forward, turn and stop.
Our team doesn't know c language and would like to have a synchronous explanation of what the program does so we can try and make it work.
Turns the robot until the IR sensor locks onto the beacon
Starts tracking with the IR sensor servos
Drives the robot towards the beacon
Stops robot when the IR sensors servos are at a particular angle.
These directives all occur in the navigate.c file. You can add your own code at the end where it says:
To run properly under autonomous you will have to at least modify the software in user_routines_fast.c (move the call to navigate(); up to User_Autonomous_Mode). The angle the sensor servos are at will depend on your robot and IR sensor mounting. Look in navigate.h at
#define LEFT_GOAL 135
#define RIGHT_GOAL 120
127 should be straight ahead, 120 is off to the side a little bit, 135 is of to the same side somewhat more. A reflection of how far apart the IR sensor servos are.
There are other parameters in navigate.h that you’ll need to tweak to match your robot.