|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#8
|
|||
|
|||
|
Example of Autonomous Code
Here is an example of some autonomous code that works. You are welcome to use it as you see fit. Hope this helps.
If comp_mode = 0 then Relay_Control 'Competition Control is disabled Out7 = 0 'Basic Run LED off when Competition Control disabled Goto End_Control Relay_Control: 'Competition Control is enabled relay3_fwd = rc_sw3 'Air compressor on when pressure switch closed - Green relay3_rev = 0 'Disable Relay 3 reverse function relay8_fwd = 1 'Rotating light on when Competition Control not disabled - Green relay8_rev = 0 'Disable Relay 8 reverse function If auton_mode = 0 then Oper_Control 'Game is in Autonomous Robot Control Period Out7 = 1 'Basic Run LED on during Autonomous Robot Control Period 'ADD OTHER AUTONOMOUS CODE HERE Goto End_Control Oper_Control: 'Game is in Operator Control Period Toggle 7 'Basic Run LED flashes during Operator Control Period relay1_fwd = p1_sw_trig 'Left Index - Lower Left Arm - Green relay1_rev = p1_sw_top 'Left Thumb - Raise Left Arm - Red relay2_fwd = p2_sw_trig 'Right Index - Lower Right Arm - Green relay2_rev = p2_sw_top 'Right Thumb - Raise Right Arm - Red End_Control: |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming Autonomous mode | Jared Stofflett | Programming | 3 | 11-11-2003 09:32 |
| autonomous mode problem on field | Chris_C | Programming | 17 | 26-03-2003 19:11 |
| Autonomous programming | Dush | Programming | 4 | 20-02-2003 09:54 |
| autonomous sensor programming ? | Laura_d | Programming | 1 | 10-02-2003 17:46 |
| How far is everyone in their autonomous programming | AlphaOmega870 | Programming | 33 | 21-01-2003 21:03 |