View Single Post
  #3   Spotlight this post!  
Unread 29-01-2007, 13:42
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,270
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by Mark McLeod View Post
Sure. Even a simple jumper on any one of your digital inputs would work.
For example:
Code:
if (rc_dig_in01 == 1) // Can use a simple jumper to pick the autonomous to use
{
	 printf("This is Autonomous_1\r");
	 Autonomous_1();
}
else
{
	 printf("This is Autonomous_2\r");
	 Autonomous_2();
}
If you want more than 2 modes you can use multiple digital inputs(I like switches more than jumpers but they are essentially the same thing) 1 digital input gives you 2 possible modes, 2 inputs gives you 4, 3 gives you 8 etc.

Another thing you can do is if between the modes you just want to change one variable (ie a delay before the code executes) you can use a pot(potentiometer) connected to an analog input and then tie the input from the pot to a variable in your code.

If you have any other questions just ask.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
Reply With Quote