|
Re: Help! Programming question with triggers
Here is how i would write it if i were you guys....
if ( 0 != p3_sw_trig)
{
pwm07 = 175;
pwm08 = 175;
}
else if (0 != p3_sw_top)
{
pwm07 = 90;
pwm08 = 90;
}
else
{ pwm07 = 127;
pwm08 = 127;
}
When writing my code i didnt do p3_sw_top == 1, my mentor sez its better to do 0 !=, and i have no idea why.
try this, if it works yay! if not sorry i couldnt be of more help
|