Hello,
I have built a program, with a counter Up / Down, with two range of counting.
The first, from 0 to 100, and second from 100 to 200.
The control of the range selection and the counting, is done by simply three buttons.
One for the range selection, and the rest for UP/DOWN counting.
I monitor my result via the IDE serial monitor, at 1200 bauds.
In generality, everything work like I want, except for one thing :
When I switch from range two to range one, normally, my monitor, will display the minimum range of my counting, from 100 it will pass to 0.
But it stay to 100, in parse of 0.
The range set, is done with "constrain" function, where some care to take with the emploiement of others function inside the brakets.
I tested it with just numerical variables, to insure me that my problem won't generated by this function, but without any success.
For me the problem, is when the counter pass from range 2 to range 1, it will not reset to the minimum range, or hold by a specific function, but after some test and using of oters functions, I cannot find why it hold like that.
If any idea or solution, I am open to listen.
Many thanks, in advance
v0.1.ino (1.2 KB)