I'm using the rpi-srf node with the HC-SR04 ultrasonic sensor but all I get is a status reading node-red:rpi-gpio.status.not-available
How can I get a proper reading from the sensor and what am I doing wrong?
Any help would be greatly appreciated!
Did you try a forum search using 'ultrasonic sensor' or 'sr04' to see if someone has done this before?
Thank you for your reply. I have spent over a week searching for an answer regarding this question. After trying for a while to fix it, I ultimately factory reset the raspberry pi and redownloaded raspbian and the other softwares. Finally, I was able to get it to work after a complete reset.
If you had looked at the various threads after searching for 'sr04' you might have discovered node-red-node-pisrf.
errr- they did - that is the node being used (see link in OP)
The node works for me (trig connected to pin10 - echo to pin 8, gnd to pin6 , vcc to pin 1)
There are a a few things to check
Have you got a newer 3.3V compatible version?
If using an old 5V version - you need to use some resistors to reduce the echo signal voltage
oh...sorry I missed that. when I looked at the image, I saw the message under the node "node-red:pi-gpio.status.not-avaliable' and (foolishly) jumped to the conclusion they were using the rpi-gpio node.
Thank you for your reply. Regarding whether or not the HC-SR04 is 3.3V compatible, I'm not really sure. But I would assume it is probably the newer one and therefore should be 3.3V compatible, as I got it recently (2 months ago) at Micro Center (https://www.microcenter.com/product/613642/leo-sales-ltd-ultrasonic-sensor-module).
As mentioned in your linked tutorial I am using the same resistors and setup. A factory reset on the Raspberry Pi has solved the problem, although I never figured out the exact root of the issue. But all is good now that it is finally working.
All the best!
What do you mean by a factory reset?
When I say a factory reset, I meant that I formatted the SD Card and then reinstalled Raspbian OS.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.