![]() |
More than 1 autonomos...
It might be such a dumb question, but at the last competition here there were some teams with more than one autonomos programing , and then, they placed jumpers interrupts in the vex rc to change between these programs, is that possible to do , or were they just trying to make us fool?
If there is any way to do it, how? |
Re: More than 1 autonomos...
Yup, we did this last year for FRC and just plain old C, but the logic should be the same, and it's good to understand the logic. We had a lot of digital ports opens, we wired up some pwms to a DIP switch and put it on the digital ports.
Code:
Auto_Mode=RC_dip_8;We had no use for that many, but we had the space for it. The number of options you can have is 2 raise to the number of switches used. =) |
Re: More than 1 autonomos...
A real easy way to do it in EasyC is to use some code like this.
If Digital Input == 1 Do stuff Else If Digital Input == 0 Do other stuff and so on and so forth |
Re: More than 1 autonomos...
Oh...so its possible.....but i couldnt understand how to do it....could sb explain?
thanks |
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) thenAlso, make sure there's always one choice for "do nothing". Don |
Re: More than 1 autonomos...
Quote:
|
| All times are GMT -5. The time now is 12:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi