I'm reading the distance with Arduino ultrasonic kit. i want to show the longest distance during the session. i used shift register to have a previous value then I compared them with new the new one, but I think my algorithm is wrong.
Thanks for your help.