Also, don't forget that your V1 variable as "byte" holds values upto 255 just as "pot" command does.
However, when you use a scale less then 255, which is 23 in your code, after 23 you still get V1 as a value bigger then 23.
Use an LCD just to see how the values in your scale do not match with the variable you are using to hold the pulse value.
To avoid this problem, you should use a check module like an IF statement.
Ex: IF V1 > 23 then V1=23
You should have already realized that after you get the value of your scale (23), your 10K pot does not respond accurately since the reading value now is much bigger then 23.
Bookmarks