|
Re: Program a motor to turn on and off every other second.....
IT STILL SAYS : "G:\2005\test pulse\user_routines.c:232:Error: syntax error"
void code()
{ THIS IS LINE 232 HELP PLEASE....
static unsigned char loops = 0; // which loop are we on?
if (p3_sw_trig != 0)
{
loops++; // add 1 to the loop counter
if (loops <= 44) {
pwm01 = 127; // motor off
} else if (loops <= 88) {
pwm01 = 0; // motor on
} else {
loops = 0; // go back to 0
}
} else {
pwm01 = 127; // switch not on, motor is off!
}
}
Someone please help me try to get this issue resolved. Thank You
|