Thread: IR Sensor
View Single Post
  #1   Spotlight this post!  
Unread 24-01-2008, 19:34
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: IR Sensor

instead of having it do the actual actions when you press the button you can have it set a variable with the button, then it does a certain routine depending on the button pressed. Example:

Code:
unsigned char test;

if(rc_dig_in01)
    test=1;

if(rc_dig_in02)
    test=2;

if(rc_dig_in03)
    test=3;

if(rc_dig_in04)
    test=4;


if(test==1)
   (routine a)

etc