Setting default analog value

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?

Put a measurement call into the setup function.

Maybe a few, and filter them.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.