|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Autonomous Program
Hi, we are currently working on a new autonomous program which uses infared sensors for more accurate readings I know several teams have done this. Anyways this is what we have come up w/ so far... can anyone spot a mistake? It tokenizes but there is a Basic run error when putting it on the robot.
if auton_mode=1 then auto1: goto end_auto_loop: auto1: first: if dist>7 then end_first: drive_R=0 'ur going backwards remember drive_L=0 if rc_sw3=0 then end_auto_loop: dist=dist + whlc goto end_auto_loop: end_first: turn: if dist>9 then end_turn: drive_R=difrdir drive_L=difldir if rc_sw3=0 then end_auto_loop: dist=dist + whlc goto end_auto_loop: end_turn: open_pnuematics: if dist>10 then end_open_pnuematics: p1_sw_trig=1 'open lower pneumatic p2_sw_top=1 'close shoulder pneumatic end_open_pnuematics: straight: if dist>16 then end_straight: drive_R=255 'straight now drive_L=255 if rc_sw3=0 then end_auto_loop: dist=dist + whlc goto end_auto_loop: end_straight: straight2: if dist>21 then end_straight2: drive_R=255 'straight now drive_L=255 end_straight2: finish: drive_R=127 drive_L=127 p1_sw_top=1 'close lower pneumatic p2_sw_top=1 'open shoulder pneumatic end_auto_loop: |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A better autonomous method.. | randomperson | Programming | 4 | 24-02-2004 18:02 |
| autonomous mode problem on field | Chris_C | Programming | 17 | 26-03-2003 19:11 |
| Fried program slots? | Jeff Waegelin | Programming | 18 | 19-03-2003 18:08 |
| Autonomous Kill Switch | UCGL_Guy | Programming | 8 | 15-01-2003 17:39 |
| Ahh! Program trick confusing! | archiver | 2001 | 9 | 24-06-2002 02:26 |