Thread: help plez
View Single Post
  #4   Spotlight this post!  
Unread 10-11-2008, 06:02
cdennisxlx2's Avatar
cdennisxlx2 cdennisxlx2 is offline
Team San Diego Web Liaison
AKA: Cameron Dennis
FRC #1266 (The Devil Duckies)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: San Diego
Posts: 188
cdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to behold
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