I have a TE501 Ultrasonic Sensor connected to my Arduino Nano which in turn is connected to my Windows PC via USB. The Arduino IDE serial monitor shows it measures consistently and reasonably accurately (+/-1%).
However, if I then unplug it from my PC and plug it into a Raspberry Pi 3 and run the same code, the serial monitor shows the same measurements to be consistently ~20% less than actual distance.
I can frig the correct result by dividing the echo time by a smaller number than on the PC, but that does seems to be a bit of a bodge.
Can anyone help me understand why the same code running on the same Arduino might product different measurements when connected to a PC and a Raspberry Pi 3 ?
Thanks for any help