Quote:
|
Originally Posted by Mark McLeod
You have the general idea, however, the joystick buttons have a value of "1" by default, and switch to "0" when pressed. You may be confusing your test by having the later switch override the first switch test.
Try a simpler test like:
Code:
if (p2_sw_trig)
pwmxxx = 254;
else
pwmxxx = 0;
|
0 does not evaluate to true - it is the only integer that evaluates to false. the joystick buttons have a value of 0 by default, not 1.