|
Re: intermdiate programmer requests your help!!!
a limit switch is pretty simple. You plug it into the digital inputs and look for it to be pressed, when it is pressed it creates a 0 signal.
if(!rc_dig_in07)// if limit switch is pressed
{ pwm05=127;//Stop arm!
backuparm(); //use a function here to back up the arm so it no longer hits the limit switch.
}
There Many ways to use a limit switch...
__________________
Kevin Li
596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
|