Hi i am using node-red first time
i simply just wanna on off led
as much i read about that i did same
but i did not find any result ,
i took a inject node
payload =string=1
Topic=off
other i took
rpi.gpio.out
my pin is gpio 3
so i slected SCL1-GPIO03-5
ouput=Digital
instate=1(High)
So No result as i understand while deploying it has to light up because i put it in instate=1.
and and then i will make another inject off 0 to off that
and for 1(on) i already have.
CODE TO IMPORT** [{"id":"15cf5244.2443ee","type":"rpi-gpio out","z":"91d7e374.caa48","name":"ON","pin":"5","set":true,"level":"1","freq":"","out":"out","x":570,"y":240,"wires":[]}]
Hi and welcome to the forum, Please put three backticks on a line above and below your code to mark it as a code block otherwise the forum screws it up (un importable)
So do you know if your LED turns on/off when changed from the command line? Always best with hardware control to try the simplest approach first. Once you know for sure that the hardware control is actually working, you can move on to the more flexible control from Node-RED.
You are talking hardware. Though LED kind of implies that, there is an LED node.
One thing you may be failing on is how you connect the LED.
I believe the practice is to connect the LED anode to + (via resistor) and connect the cathode to the GPIO pin.
This way the RasPi sinks the current.
If you wired it up so the anode goes to the GPIO pin and the cathode to the GND, it won't work as expected.
Another thing - maybe academic - but what you are injecting:
payload = string = 1.
Probably better if you make that a number rather than string.
Strings of 1 and 0 don't exactly equate to high and low on the GPIO pins.
true and false could also be used but I am not too sure on how that translates via the GPIO node.
(rpi.gpio.out I think is the node you are using)
i tried with resistor also but not working.from terminal it working perfectly.
i am not understanding why that nuch small thing is not happening.
it seems me like it is not getting connected from RPI3. Besides node-red is running properly
yes it it working from terminal perfectly
but from node-red i don't know it is approaching rpi3 or not because if it was approaching it should definitely work.