View Single Post
  #1   Spotlight this post!  
Unread 23-03-2005, 17:02
jdong jdong is offline
Linux Nerd
AKA: John D
#0245 (Adam-Bots)
Team Role: Programmer
 
Join Date: Apr 2004
Location: Rochester, MI
Posts: 98
jdong will become famous soon enoughjdong will become famous soon enough
Re: Question about switching autonomous modes

At Team 245, we have a rotary, 10-number (4-bit) switch that connects via Digital IO's.

To read in the value, define a macro AUTON_ROUTINE:

Code:
#define AUTON_ROUTINE (rc_dig_in10 | (rc_dig_in11 << 1) | (rc_dig_in12 << 2) | (rc_dig_in13 << 3))
In our case, we have our switch connected to Digital IO's 10, 11, 12, and 13. Adjust accordingly.
__________________
John Dong
Co-Captain, Webmaster / Programmer
Team 245 -- Rochester Adams Robotics