NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

Hi

I have an SR-05 connected to an ESP32 DevKit C and am using the Arduino IDE to drive things.

It all worked fine for a while: I could reliably measure distances in cm with no problems using the following code snippet:

   unsigned int uS = sonar.ping_median(10);
   sensors.distance = sonar.convert_cm(uS);

Now all of a sudden I only seem to get random results. Mostly zero and then large numbers. I don't think I did anything I should not have. Could it be that I have frizzed the sensor in some way? What could I look for? The placement of the hardware did not change either (as far as I can tell).

Any hints welcome before I go and buy another sensor!

Thanks, David