View Single Post
  #1   Spotlight this post!  
Unread 23-03-2005, 08:43
Kims Robot's Avatar Unsung FIRST Hero
Kims Robot Kims Robot is offline
Onto a New Chapter...
AKA: Kim O'Toole Eckhardt
no team
 
Join Date: Aug 2004
Rookie Year: 1996
Location: Framingham, MA
Posts: 1,467
Kims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond reputeKims Robot has a reputation beyond repute
Send a message via AIM to Kims Robot
Re: Question about switching autonomous modes

We would really need to know more about what your switches are. In general, switches can be hooked to either the analog or digital ports, depending on what you are trying to get out of them.

If you just want an on/off signal (in terms of is each automode on or off), you can hook it to either. Then what you get into the controller (and read in in the code) for the digital ones are 0 or 1 as you mention, and for analog switches you will read in 0 or 255. If you hook the analog switch to the analog port, you will read in a range 0 to 255.

Make sure your code reads in for those switches, and then you can use the input from those switches to control your automode in the section defined in the code for automode (FIRST commented it as such, I dont have the code in front of me, so I dont remember which one it is).

Hope that helps!
__________________
~kim~
Kimberly O'Toole Eckhardt <3
Principal Systems Engineer & Program Manager
History - Team 176, Team 229, Team 1511, FIRST Volunteer!!
My new FIRST Photography Hobby & Angry Eric's Fan Page
Excellence - is the result of caring more than others think is wise, risking more than others think is safe, dreaming more than others think is practical, and expecting more than others think is possible.