Quote:
Originally Posted by Ether
True. (Hey, a little Boolean humor there).
You don't need "==" to return a Boolean: a single "=" inside an if() statement will indeed return a Boolean. But as you said above, not what the OP was expecting.
If you already have an appropriately-named Boolean variable, you can cleanly code it by simply testing the variable:
if (limitPressed) {...}
|
So I will keep my if statements to one =. The limit switch is still not working here is a link for a picture of it.
http://imgur.com/nRB3VqN. We used ground and signal from our pwm and it goes to DIO 4.