|
Re: help plez
Well for relays you would just change the pwm value on one of the dig_io ports to the relay port [ex. 'Limit_Switch_Max(rc_dig_in05, &relay1_fwd);']
Now for if statements we would have to know exactly what your doing with the limit switch, because if you are just using it to stop or start a motor the you don't have to have if statements. But if your doing something else with it, like telling it when it gets switched to start a sensor of some kind or wanting to have it only stay switched for say 10 seconds then reverse the motor you could add if statements here if you wanted to in order to achieve what ever your task is.
__________________
Team San Diego Robotics Web Liaison
Webmaster and Technical Advisor for the San Diego Regional Planning Committee.
Official Score Keeper for the San Diego Regional
www.sandiegoregional.com
www.frc1266.com
|