Here's another idea, which our team is using. The new Smart Dashboard has a way of storing values and sending them to the robot on startup. We use one of the variables to store a value indicating which steering method to use. When the robot connects, it reads that variable and stores the value locally. The code from that point is pretty much as other posters have described.
As an aside, we have three different steering methods to choose from:
- Tank drive (two joysticks independently control left/right wheels)
- Arcade drive (one joystick, tilt left/right to rotate robot)
- 3-axis (one joystick, rotate handle to rotate robot, tilt left/right is ignored)
We're using the common 6-wheel drive, so sliding left/right isn't an option
Hope this helps. Good luck, all!