View Full Version : Using driver station digital inputs
01-19-2009, 02:25 AM
Can a team connect switches to the driver station digital inputs
to set which bit of autonomous code they want to be run during
the autonomous period?
Also, if this is kosher (and a rather a simple thing), does a team need
permission to add a box with switches as this might qualify as "special electronics"?
Thanks and best of luck in the competition!
01-19-2009, 02:41 AM
Not sure about adding it to driver's station, but I know in the past we've put a switch on our digital i/o on our RC for autonomous to choose between certain settings.
01-19-2009, 05:35 AM
Technically this is possible. As for the rules, the only applicable rule I can find is G1.
AUTONOMOUS PERIOD - The AUTONOMOUS PERIOD is the 15-second period at the start of the MATCH. PILOT control of the ROBOT is not permitted at this time. During this period, the ROBOTS may react only to sensor inputs and commands programmed into the onboard control system. All ROBOT safety rules are still applicable during the AUTONOMOUS PERIOD. The AUTONOMOUS PERIOD ends when the arena timer displays zero seconds left in the period.
This may be soothing to post on the FIRST Q and A.
Assuming using the input during autonomous is legal, you won't need special permission to attach switches to the DS inputs.
If for some reason you can't use the DS inputs you can use the inputs directly on the robot and set them while placing the robot.
01-19-2009, 08:57 AM
Yes in the past we have also used the Digital inputs on the RC unit but I am under the impression that the digital inputs on the drivers station are available and activated during tjhe autonomous period which is more convenient for the drive rto set these up before the match begins...
Does anyone know if this option is available and permitted from the drivers station this year?
01-19-2009, 02:12 PM
Does anyone know what type of switch to use? Also, how would you have a program decide between three different inputs?
01-19-2009, 02:44 PM
We are thinking of having four options, (actually 3 options and off) and I am considering using a rotary switch with 1k ohm pull down resistors where one position will be tied to nothing and the other positions sequentially tied to digital inputs 1, 2, & 3 with +5v connected to the common of the switch....
Then the programmer will only have to read the digital switches & AND them to 07h to determine which digital input we are selecting...
incidently these 4 options can be handled with only 2 digital inputs and 3 SPST switches (with pulldowns) and the commons tied to +5v or 3 SPDT switch commons (without pulldowns and one of the wipers tied to +5V & the other to Gnd) then the programmer only needs to read the Digital inputs & AND the read value with 03h to determine which of the 4 options are desired...
The reason for the pulldowns is that I read that the driver station does not have pull ups or pull downs on the digital input lines which can make for some unpredictable results if they are not tied to one rail or the other...
Clear as mud, right?
01-19-2009, 07:01 PM
The digital and analog I/O on the driver station are for the purpose of creating custom UIs for the robot. It is true that there are no pull-ups on the digital inputs, so you have to explicitly do that yourself or you'll get unpredictable results. You can also do tricks like use a set of resistors and a switch to use one of the analog inputs as many digital (switch) inputs if you're running out of real digital inputs.
Be aware that in the future it is possible that you will not be able to read the driver station values during the autonomous period. So plan on writing the code to store values in variables during the disabled period before autonomous then use them in the autonomous period.
vBulletin® v3.6.4, Copyright ©2000-2018, Jelsoft Enterprises Ltd.