View Single Post
  #4   Spotlight this post!  
Unread 11-11-2003, 09:32
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
I would just connect a switch to one of the digital inputs and use that to control when the bot is in "autonomous" mode vs. driver-controlled mode.

Then just use an "if" statement:

Code:
if (rc_dig_in16) {
  // Run Autonomous Code
} else {
  // Run Driver Control Code
}
You could put this in the Process_Data_From_Master_uP() function found in user_routines.c. If you want to keep the default drive code, put it after the call to Default_Routine(), however you could nix the default drive code by replacing that call with your new code.