Good Switch For Autonomous Mode Select

just wanted to share this info. On our robot for the past few years we have been using a SCSI drive select switch. It digitally selects the decimal values from 0-9, giving us 10 modes in autonomous.

They are inexpensive, and are good for teaching binary math as they wire into 4 digital I/O ports and then do bit math to get the decimal modes.

Here are some examples…

goto here

http://www.scsisource.com/scsi_enclosure_cables/

look for

SCSI ID Selector Switch (0-15) w/selector cable
$6.00

this one would do even more modes than 10 as I state above.

wiring instructions are here…

http://www.wetex.com/downloads/SCSI_ID.PDF

good luck…

Ken Leigh
Team 811 controls Mentor

Cool idea, I actually have some old SCSI equipment with such selectors on board that I can steal. It’s a lot easier than teaching the driver team binary! :smiley:

Jake

We’ve used the joystick trigger to cycle through a number shown on the user byte on the OI. It’s worked well enough, and the best part is that there’s no extra hardware.

We used similar switches. We got ours from Digikey. They are available in many varieties, from push-button to thumb-wheel, and sizes.

Unfortunately, we didn’t mount them in the safest place, and they got damaged at out last regional, so we had to order more, and have to install them (in a safer location) at our next regional.

Our autonomous mode was programmed using a self servicing command structure. We wanted to have full access to the field at the click of a button, but did not want go through the pain that is trigonometry on the PIC processor. We decided we wanted to use a pocket PC based map of the field to create way point data. Also, we wanted to get rid of most of the processing overhead on the handheld’s processor, leaving us free to run a variety of sensors and a robot waypoint navigation system without the trouble of a co-processor.

To do this, we created a map of the field in Visual Basic with the coordinate system being the amount of encoder ticks it would take our robot to traverse from one side to the other. We are able to draw waypoints, and insert actions at each waypoint (shift gears, auto track corner goal, spit balls, suck in balls, change speed, change orientation… etc) The VB program then made a list of commands, which were stored as base 255 numbers in the eeprom on the RC. Our RC program was made to accept incoming serial data and throw it in the eeprom.

We are able to select which autonomous mode we would like to use from a serial LCD on the robot, as well as access full diagnostics, such as feedback on all inputs and outputs. This has helped us tremendously and makes preparing the robot for matches ten times easier.

Very impressive! Our programmers were working on some fancy stuff, but we never got to finish testing and debugging most of it, and we had to remove a lot of stuff, including the camera, due to weight issues. Though, what we have left works well, and we might be putting some of the extra stuff back on at the next regional.

Can anyone elaborate on using the joystick trigger to cycle through the user bytes on the OI to change the auton. mode? Thanks.

Create a external unsigned char variable that is accessisble to
both user_routines and user_routines_fast. Use this variable
to “count” the number of trigger clicks while the robot is disabled,
during the setup by the students, and display this on the user mode
display. Refer to the section in the default code that would otherwise
display the backup battery voltage. With the selected number,
0 through 255 (or some smaller range) stored in the external variable,
you can then use it to select the autonomous mode when this code
is entered.

This is not a bad idea, but we have other uses for this display…

How do we display custom variables on the OI 4 digit display?
Also, where and how can you declare a global variable that is accessible to user_routines.c and user_routines_fast.c?

To display User_Byte1 (a variable in the code) press the OI select button a couple times till the display reads “uXXX”, where XXX are the 3 digits of User_Byte1 (it should first flash u012 because that is your firmware version). You can change User_Byte1 in code using the joystick as Kris noted. User_Byte1 is global and defined in ifi_aliases as txdata.user_byte1.allbits. It is normally set to the Breaker that tripped but you can change that. The other 5 User_Bytes can be displayed on the dashboard.

I personally use OI rotary switches since I always have plenty of OI analog inputs left.

Another idea that we are using this year is a 12 pole DIP switch that easily allows us to use thousands of different autonomous codes. Currently, we’re only using a few hundred, and I wrote them all in an hour, but I’ll leave it up to the coders to figure that one out.

We put one of those SCSI switches on the robot last year, but the highly efficient programming team only ended up making 1 auton program. Although we never needed to change the number, we did have mechanical problems with the switch after the competition was done. I would suggest bringing a spare, or a backup plan of some sort.

This year, for auton selection and the user byte display on the OI, we’re using one of those 12 position (I think) rotary switches with the resistor chain on it … and plugged into an analog input on the RC. Not sure how it plugs into the OI, I’m guessing on a joystick axis that isn’t used.