Problem using exec node to control servo

138 views
Skip to first unread message

Toshi Bass

unread,
Feb 24, 2017, 7:01:23 AM2/24/17
to Node-RED
I have a servo connected to gpio18 on my raspberry pi, once I initialize the pigpo library at the cmd line using  sudo pigpo.pi I can enter  pigs servo 18 500  and the servo will move to fully clockwise position and if I enter  pigs servo 18 2500  the servo moves to fully anticlockwise position, fine its working exactly as it should.

I want to recreate this in node-red so I assumed if I use the exec node with a command  "pigs servo 18 500" it would work, but it doesn't I get following :

24 Feb 11:56:14 - [info] [debug:b2d035c4.46dec8]
{ payload:
   { [Error]
     killed: false,
     code: 127,
     signal: null,
     cmd: '/bin/sh -c "pigs servo 18 500" ' },
  _msgid: '2d0905c7.d2f6fa' }


Can anyone help me find solution what I am doing wrong ?


Message has been deleted

cin...@gmail.com

unread,
Feb 24, 2017, 11:08:00 AM2/24/17
to Node-RED
code 127 means that the command is not found in the current shell.
Reply all
Reply to author
Forward
0 new messages