MIN and MAX settings
eagletalontim
Posts: 1,399
I was wondering exactly how MIN and MAX works.
If I put :
Would temp1 only go to 255 and not loop back to 0? Same goes if temp1 = 10 and I subtract 20. I know that if a variable exceeds its limit, it will loop back to the beginning. I don't want this to happen.
If I put :
temp1 VAR Byte temp1 MIN 0 temp1 MAX 255 temp1 = 250 temp1 = temp1 + 20
Would temp1 only go to 255 and not loop back to 0? Same goes if temp1 = 10 and I subtract 20. I know that if a variable exceeds its limit, it will loop back to the beginning. I don't want this to happen.
Comments
I
Here is the code I am working with :
values1(13) is 255
values1(14) is 82
It should return a value 0 to 100. If the ANALOGIN ever returns 81 or lower as the result, it will loop back around to 255. I do not want it to do that.