|
Re: A few simple programming questions;
Quote:
|
Originally Posted by Oumonkey
if(p3_sw_trig == 1)
{
pwm09 = 0;
pwm10 = 0;
}
else (p3_sw_trig == 0);
{
pwm09 = 254;
pwm10 = 254;
}
|
The portion highlighted in red is a syntax error. There are two ways to correct the error. Since the value of the variable can only be 0 or 1 you can just delete the portion in red. Or you can change the syntax to:
Code:
if (p3_sw_trig == 1)
{
pwm09 = 0;
pwm10 = 0;
}
else if (p3_sw_trig == 0)
{
pwm09 = 254;
pwm10 = 254;
}
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
|