Keep track of the last value read and only print it when the value reaches 1023 and it wasn't 1023 on the last reading; This is known as signal edge detection.
Keep track of the last value read and only print it when the value reaches 1023 and it wasn't 1023 on the last reading; This is known as signal edge detection.