View Single Post
  #5   Spotlight this post!  
Unread 16-03-2008, 13:55
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,988
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: More than 1 autonomos...

Um, I think they just did.

Let's say that in Autonomous 1 you want the robot to turn left, and Autonomous 2 you want it to turn right.

Code:
If (Digital_input_1 = 1) then
     [Code to turn left]
EndIf
If (Digital_input_2 = 1) then
     [Code to turn right]
EndIf
Now, you need to think more about this, because what happens if there are jumpers on both inputs 1 and 2? (someone forgot and put both on). And a lot of IF statements might become impractical if you have 25 different autonomous modes.

Also, make sure there's always one choice for "do nothing".

Don
__________________

I am N2IRZ - What's your callsign?