I think I strayed away from this because most of the lower cost proximity sensors are pretty drop-dead [code lang=âarduino bildr is in need of people
Double distance = -1.0f;. // Only read Serial if ready and has data in buffer.
Library for Ultrasonic Ranging Module HC-SR04 – Arduino Forum
And what the source code Serial.Print(âInitializing Proximity
InputPin, INPUT); // declare sensor as input Serial.Begin
Arduino proximity sensor | eBay