Go to Post Throughout the "FIRST" experience we're all taught that if we try hard we'll achieve some level of success down the road; it hits everyone differently. - nlknauss [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 07-02-2003, 13:31
Carl Owenby Carl Owenby is offline
Registered User
#0654 (Maclay Robotics)
 
Join Date: Jan 2003
Location: Tallahassee, FL
Posts: 24
Carl Owenby is an unknown quantity at this point
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:
__________________
There are 10 kinds of people in this world; those who understand binary and those who don't.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 08:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi