Quote:
Originally Posted by Mark McLeod
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.