Swapping codes

I have codes for both the left and right side of the ramp. We want to load the code used in the pits and then somehow swap it before the match in case we are assigned sides and don’t get to pick so we can swap codes. It’s easy to merge the codes but how have other teams made it to swap sides? Are you using switches? Is there anyway to swap it on the RC itself without a switch? I’m just trying to find the simplest way and hopefully get out of installing a switch on the robot on the practice day. Thanks everyone.

As far as I know you can use the Operator Interface to set what side you want your robot to go, since you can communicate with the RC. The reason why you cannot operate your robot during that time is because the processor that generates the PWM codes and controls the relays is disabled.

Good Luck!

Eugene

Remember, during the human player period, operator will NOT be allowed to touch the OI.

The simple solution is to put a toggle switch on your robot and wire it to a digital input. Then some simple code and you are done.

RigthTurn VAR rc_swB.bit4 '13 Autonomous Mode Turning Direction: 1=Right, 0=Left

IF RigthTurn THEN
'Do Right turn code
ELSE
'Do Left turn code
ENDIF

I hope this helps

Tim Tedrow

But, you can touch it before :slight_smile:

Keep in mind that FIRST has stated the match list will say which side of the ramp you are on. You can use this information to download the appropriate code ahead of time…

If you look on the Robot Controller, there is a jumper which can be placed on either user or default. I simply loaded a program for starting on the left side while the jumper was on default, then switched the jumper to user and loaded a program for the right side. This was more of a quick solution to switch between programs since we did not have our program selector switches wired yet. The program ran fine each time. The only downside is that the jumper is pretty small and annoying to change sometimes.

*Originally posted by Kevin Rugani *
**If you look on the Robot Controller, there is a jumper which can be placed on either user or default. I simply loaded a program for starting on the left side while the jumper was on default, then switched the jumper to user and loaded a program for the right side. This was more of a quick solution to switch between programs since we did not have our program selector switches wired yet. The program ran fine each time. The only downside is that the jumper is pretty small and annoying to change sometimes. **

I thought you couldn’t overwrite the default code? Also, where did they say you will know which side you are on ahead of time? I thought they just said they might not tell you till just a few minutes before a match? Thanks everyone.

I loaded our modified program with no problems on the default side, and it ran fine every time (at the UTC scrimmage hosted by aces high in suffield, ct). As far as starting sides, there were printouts of the match schedules which told each team their color and starting side. I’m assuming that F.I.R.S.T. will run things the same way. I am pretty sure you can overwrite the default code, however.

*Originally posted by miketwalker *
I thought you couldn’t overwrite the default code?

The original (2000 I believe) IFI controllers did not allow you to overwrite the code in the Default slot, but due to some faulty STAMP processors which were spontaneously losing the user code, they unlocked the Default code slot to use as a backup,intending you to load a second copy of your code into the default slot. However, nowhere in the rules does it say that the two code slots have to be identical.

** Also, where did they say you will know which side you are on ahead of time?**

[rule=gm8]Here’s the rule which says you will know
in advance where on the field you will be[/rule]