Our team was considering putting some lights on the robot that would change to the alliance color. Does anyone know of a variable or any section of the code that we could access to automatically determine which light set to power? Possibly referencing the LED output?
AFAIK there is no way to tell in code what team you are on.
However, you can add a switch to the robot with a “red” and “blue” setting and just have your drive team manually flip it before matches.
That’s what I was afraid of, that it was hidden somewhere in the Master Code, and we wouldn’t be able to access it.
Would it be legal. I know that the CMU cams can read green but would the other color lights mess with the camera?
I’m not exactly sure what you are asking, but I know that the Allen-Bradley lights aren’t in the color threshold in Kevin Watson’s default camera code, so they shouldn’t interfere. As far as “Would it be legal”, I hope you don’t mean “Would it be legal to use other lights to toy with the other alliance’s CMUcam?” That’s clearly illegal per rule <R33>:
<R33> No devices or decorations are permitted on the ROBOT that are intended to jam or interfere with the operation of the vision system (i.e. changing ROBOT color to confuse opponent’s vision system).
JBot
are there any lights provided in the kit to show your team color? i havent seen anything so far. or do we have to get them ourselves?
i’m not sure if it’s legal, but AFAIK there are two sets of team color pins.
You could make some custom circuity that hooks up to the second set of pins.
Alliance color will not be indicated by lights this year.
<R15> ROBOTS must use one of the two FLAGS provided at the event queuing location to display their ALLIANCE color (red or blue). The FLAG must be held in a flag holder mounted on the ROBOT…
Well, what I was thinking on was that last year, our team had brake lights for fun on the electronics board which was right on the back of the robot. Depending on our color the next match, we would switch out the color filter in order to avoid confusion (even though brakes are usually red). We didn’t have any problems last year with the rules. (On the attached picture you can see the lights on the top corners.)
I was just thinking of making this process of switching colors a little more automated this year, but it’s probably best to go back to a more manual solution anyways.
better yet, I thought something cool to integrate to our bot would be these lights from previous years here and they could tell alliance color and they would be a cool little decoration because then you’d know exactly where your bot is because they are pretty bright.
Pavan.
You might look into taking the team color lights from your previos year’s robot. I don’t know if the TEAM COLOR outlets on the board will be activated though. You could probably check into what exactly those outlets give you and wire them to your analog inputs, but I have no idea about A) the legality, B) the funtionality, or C) How you would go about testing it without the official field.