I dunno whether the Lego sensor isn't any good; I suspect that it's much the same as all the others. But these sensors are available cheaply all over the place. So you could easily try one. Here's a pack of three for 3€
https://www.temu.com/fr-en/3pcs-hc-sr04 ... 00336.html?
It could also be that you need to play around with the software to "tweek it"
I've not used these on a full fat Pi, only on Arduino and Pico, but the principles should be the same. I had to experiment quite a bit before I got it to work reliably.
There is lots of information that might help you that's written for Arduino...Try doing a search for
"arduino ultrasonic sensor not working"
...or something similar.
This has quite a good explanation
https://www.instructables.com/Simple-Ar ... 4-Example/
https://www.temu.com/fr-en/3pcs-hc-sr04 ... 00336.html?
It could also be that you need to play around with the software to "tweek it"
I've not used these on a full fat Pi, only on Arduino and Pico, but the principles should be the same. I had to experiment quite a bit before I got it to work reliably.
There is lots of information that might help you that's written for Arduino...Try doing a search for
"arduino ultrasonic sensor not working"
...or something similar.
This has quite a good explanation
https://www.instructables.com/Simple-Ar ... 4-Example/
Statistics: Posted by kip_the_elder — Sat Aug 09, 2025 7:16 pm