Hi, i am new in node-red. I try to connect ultrasonic sensor HC-SR04 to raspberry pi 4 and use palette rpi-srf.
This is my setting of palette rpi-srf:
and after i click deploy, there is an warning appear under pallete rpi-srf that say "node-red:rpi-gpio.status.not-available" like this :
Can anyone help me, what is wrong with that and what is the solution ?
Thankyou
I think if you want NR to see the GPIO pins, you need to edit the boot configuration.
Alas I can't remember exactly.
I hope someone can help you though.
how to access GPIO pins - Node-red RasPi
Execute the command : "sudo raspi-config"
Go to "Interfacing Options"
Go to "Remote GPIO"
Choose "Yes"
Hi, Thank for your replay.
I already tried but it doesn't work. When i try to control led with "button" node connect to "rpi-gpio out" node, everything works good. So "rpi-pisrf" is only node that doesn't work for me to connect to gpio
Yeah, sorry....
It has been a long time since I've played with this node.
I am hoping someone else would be able to help you better than I can.
(You did reboot after the config
change?)
i also try to reinstall the OS on sd card, and reinstall the node-red again. but still doesn't work
indulge me:
Open the RasPi GPIO node and take a screen shot.
I may see something.
Ok, so you have to select which pins you want to talk to.
I can't see any pins selected in that shot.
Not to say there aren't.
EDIT
Ok, I scrolled back and looked at your first picture.
Pins 33
and 35
.
They aren't ticked.
(Though it does say 17
and 18
are....)
Ya, I already select the pin on "rpi-pisrf" node. or do you have any suggestion to access ultrasonic sensor HC-SR04 with another node ?
Sorry which is this rpi-pisrf
node?
Oh, ok.... But when I look at the first screen shot it is saying it is using pins 33 and 35.
YOU chose them.
But in the last one of the GPIO node, pins 33 and 35 aren't ticked.
I can't move past that.
(BTW, maybe save screen shots as PNG not JPG.... Too much loss)
The first image that i post is setting for "rpi-pisrf" node. And the third post is setting of "rpi-gpio in" node that you request. So, it's display setting for difference node.
and both nodes need to use the same GPIO pins, or things won't work.
And the device needs to also be connected to those pings.
Not much good putting the device on GPIO pins (say) 12 and 13 and setting the GPIO node to look at pins 33 and 35
Not going to work.
EDIT
I guess I am going to have to add:
I have NOT used the first one.
And I am running on memory on how the GPIO node works.
I only use rpi-pisrf, and not rpi-gpio. Because we only need rpi-pisrf to connect/access to Raspberry GPIO that connect to SR04. And i already connect the device (SR04) to pin 33 for trigger pin and pin 35 for echo pin
Well, if that is the case:
I have no idea.
Never used the node.
I can't help you, sorry.
There were changes made in the Pi OS late 2023 that affect the way GPIOs are accessed
Can you possibly reformat and install the previous version (Bullseye) and see if it works in that?
Thank for your attention and your reply. I appreciate it so much
vani:
HC-SR04
Also, do you know if you have a 5V or a 3.3V version - do you have a link to where you purchased it from?
I've juist wired up a 3.3V version to a Pi2 running Bullseye and it works fine (I connected trig to pin16, echo to pin 18)