I have an ultrasonic sensor patch that is designed to first pan the servo and then read a distance, i.e., it reads distance AFTER the servo changes position. This is the patch:
I use that patch in another patch that is designed to take three readings from the sensor in three different directions. It is working EXCEPT the reported distance is measured BEFORE the servo changes its angle. In other words, the resulting measurement is the distance to an object before the servo changed angle for another reading. I don’t understand why the distance being reported is from the previous sensor/servo position.
Here is the patch in which the sensor is being used to take successive readings in three different directions: