I am using a Pepprl+Fuchs ultrasonic distance sensor. I am reading analog voltage and converting variable distance with reference fix position i.e. distance remains constant between surface and sensor.
But during handling, sensor position sometimes gets disturbed which affects positioning of nozzle, operated by stepper motor.
I need guidance.
Whenever Arduino / sensor is powered, initial voltage / distance is considered as default value for further voltage / distance variations calculation.
How can I achieve this?