The way you have it programmed is if the distance is less than 10cm it will move forward for 1 second and if it is more than 10cm it will move in reverse for 1 second. It will do that over and over again. Is that what you want?
The way you have it programmed is if the distance is less than 10cm it will move forward for 1 second and if it is more than 10cm it will move in reverse for 1 second. It will do that over and over again. Is that what you want?