@ first ... your processor will be able to see a change only AFTER data have been collected ( La Pallice, french philosopher ).

from that, if you collect data once a second ( as written @ post #1 ) no need to scan value @ each millisecond ...

just place your test ONCE after data collection ( ADC conversion or serial value received ) and you won't loose any time !!!

no need to have a watching loop nor ...

Alain