Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Determining Team Color (http://www.chiefdelphi.com/forums/showthread.php?t=36670)

larwilliams 28-03-2005 12:43

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

kevin.li.rit 28-03-2005 12:58

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.

Mark McLeod 28-03-2005 13:15

Re: Determining Team Color
 
Quote:

Originally Posted by larwilliams
Is there any way to determine programmatically which team color you are assigned?

No. The team/alliance color is not accessable from your program.
We too use a red/blue switch of our own that the coach or driver sets before the start of the match.

Tom Bottiglieri 28-03-2005 13:47

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;
else color=red;

In this the color would default to red, unless the wheel was turned towards the front.

larwilliams 30-03-2005 07:41

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