Hi
I understand why it does not work like expected.
First of all I was now using the big while to repeat each measurement when the result was bigger than 3.
You now do not repeat the measurement (you add every measurement to the loop)
And I really do not understand why you are using a shiftregister in the small while.
Try to make this clear to me.
Maybe you only want to divide the result by 10 and then continue.
If so you have to change the case frame. What now is false should be true and true should be false.
But also you need to check for absolute vale >3 instead of value >3
greetings from the Netherlands