Hello, for example I have a data type int x.
I would like to increment x or decrement x based on other comparison.
However I only want the range of x to only be from 0 - 255.
I've check out some solutions like,
constrain(x, a, b), so it'll be like
int x = constrain(x, 0, 255);
If that works, where should i write this line at? Does declaring it as a global variable work fine?
If not, is there another better/simpler method?