I have a script to bring a current time on LCD in Raspberry PI. LCD is connected with Raspberry PI tested working fine. I created a script name index.js inside ~/.node-red folder, and have installed LCD node module inside the same ~/.node-red folder using command : When I tested inside using the command it brings the time on the LCD. How to execute this index.js script in node-red node exec? I have tried but does not work. [{"id":"49a533a9.b65acc","type":"inject","name":"","topic":"","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":127,"y":97,"z":"5acd84ba.a5327c","wires":[["14f033d4.eb0fcc"]]},{"id":"14f033d4.eb0fcc","type":"exec","command":"sudo /home/pi/.node-red/node index.js","addpay":true,"append":"","useSpawn":"","name":"LCD","x":329.18345642089844,"y":107.16499328613281,"z":"5acd84ba.a5327c","wires":[[],[],[]]}] In inject node I entered string 1 as payload In exec node I entered command: I tried in many ways to execute but no luck, please check the pictures and help me in this issue. Thanks a lot in advance |
So OK - you can't use sudo in an exec node.
Tried the latter Dave – worked with C program written using WiringOp - no problem – but that of course does now let me access PWM on non-PI
In this case- made no difference.
FAHW-Lib: Unable to open file /sys/class/gpio/gpio203/value
Etc
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/d2X4ilESMl0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.