|
Re: Autonomous Scripting Manual
FIRST and Kevin Watson have provided us with great driver programs this year. By that I mean, they have wrote c files that will do things that are usually tedious to code for, such as sampling a gyro, or counting quadrature encoder ticks, and made them available to us. Now what you need to do, as Bharat said, is figure out what your robot needs, write those things down in a list. Then look at all the drivers given to us (gyro.c , encoder.c , pid.c , camera.c --and their headers!). So now that you understand what functions are in these programs, you can add what you need to your default code workspace (provided from IFI.. the one with no PID or camera support), and set your user_routines.c, or whatever file you are using to control the bot to include your newly added driver c files. When this is done, it will be easy to call any function from any of the drivers, and you will understand the code more because you helped create your robots workspace, instead of just changing values in the default code.
If you dont understand this, think of it as inlcuding an API in your win32 coding, and then calling functions from it.
[EDIT] Dont forget to configure your drivers, by modifying the header (.h) files (respective to that .c file, of course) If you look in the headers, there will be multiple #define statements, where you must change values that are specific to your robot and sensors, such as wheel diameter, output RPM, and gyro scale factor [/EDIT]
Last edited by Tom Bottiglieri : 17-01-2005 at 10:06.
|