View Full Version : autonomous code placement
pagemauck
24-01-2004, 11:13
I'm guessing all autonomous code will go in the section marked for it in the user_routines_fast. Are we being stupid putting line tracking code in here since the statements for sensor input like
if(rc_dig_in06 == 0) pwm=255;
don't work for us in this section while a simple pwm=255; works fine
deltacoder1020
24-01-2004, 13:33
not all autonomous code goes in user_routines_fast - anything that is going to be acting on sensor input should probably just go in user_routines, as the sensor input is only updated once per user_routines call. put processing that is not sensor-dependent in user_routines_fast.
Astronouth7303
24-01-2004, 20:11
If you fell REALLY ambitious, You can modify void Main() so that it runs through everything twice: once for Autonomous, then again for user. The worse that could happen is that it screws with your controller and your robot self-destructs :p.
Serriously, the only thing you don't download over is eeprom, and that's not really used much (I think). If you just download the regular default code, it should work fine.
It would essentially create 2 programs. I would put Autonomous code in sepperate files.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.