View Single Post
  #3   Spotlight this post!  
Unread 09-03-2015, 14:56
Shaif Shaif is offline
Registered User
FRC #5580 (SQUAD)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Toronto
Posts: 17
Shaif is an unknown quantity at this point
Re: Need A Little Help On How To Make Autonomous Switcher

Quote:
Originally Posted by virtuald View Post
I would use SmartDashboard/SendableChooser, it'll be easier.
Quote:
Originally Posted by rich2202 View Post
On the RoboRio, you can use the Digital IO and/or the Analog IO ports.

You set up a switch (single pole, double throw), with the outside posts going to +5 and ground (red and black wires), and the middle post connected to signal (white). You then see whether the switch is on/off for DIO, or above or below 2.5 volts for AIO.

The easier way is to use smart dashboard. I prefer writing a variable to the smart dashboard, and reading it back. The variable can be changed at any time, up to the time when autonomous starts. You then read the value during Autonomous Init to determine which autonomous program to run.
I didn't think of that until now. But making the autonomous switcher seems like a cool project to work on now that my season is over.