Topic: Arduino statement constrain(ledPinVal, 0, 255); doesn't work on Remote
With the up/down button to increase/degrease a value within the limit 0-255, the Arduino statement
constrain(ledPinVal, 0, 255); doesn't limit the value to 255. It keeps going up >255 and <0 as well.
But this statement
if (ledPinVal <= 0 || ledPinVal >= 255) {
ledPinVal=255;//works.
Same for
if (ledPinVal <= 0 || ledPinVal >= 255) {
ledPinVal=0;//works