|
Re: Limit Switch for PCM
Create your own variable to hold the value of the limit switch (connected to a Digital Input, of course).
Then you can do something like:
switchstate = DigitalInput(10); // read DI 10 limit switch
if (switchstate == 1)
pwm = 127;
else
pwm = something else;
PWMOutput(2, pwm); // output pwm value to PWM2
You are correct, the EasyC functions provided for PWM output do not include support for limit switches.
|