the serial monitor is showing the numbers fluctuate even when the distance is controlled, and remains the same. something with the sensor data is not giving consistent number readings, rather fluctuating readings despite your logic.
the serial monitor is showing the numbers fluctuate even when the distance is controlled, and remains the same. something with the sensor data is not giving consistent number readings, rather fluctuating readings despite your logic.