![]() |
Determining Team Color
Hi,
I tried searching for this in the forums so please excuse me if I simply missed it... Is there any way to determine programmatically which team color you are assigned? This is for autonomous mode programming...mirrored on opposite side of playing field. Thanks. Larry |
Re: Determining Team Color
Not sure about that but another way you can get around this is to wire up a switch to the Robot Controller to correspond to which side your robot is on.
|
Re: Determining Team Color
Quote:
We too use a red/blue switch of our own that the coach or driver sets before the start of the match. |
Re: Determining Team Color
An easy way to set team color without adding any switches to your bot is to use the wheel on the older flight stick joysticks if you are using those. The wheel isnt used for any normal robot control, so you can say turn it all the way forward for blue, and all the way backward for red. Then, in your code say:
Code:
if(p1_wheel > 210) color = blue; |
Re: Determining Team Color
Thanks to all that have responded.
It seems that a simple toggle switch is the way to go to set team color for programming purposes. We already have a 3 position switch that we are using to specify left, center, right starting position for autonomous mode... Larry |
| All times are GMT -5. The time now is 12:29. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi