title: How to run a command in node-red node exec to enable a script for LCD
body: <p>I have a script to bring a current time on LCD in Raspberry PI.</p>
  
  <p>LCD is connected with Raspberry PI tested working fine.</p>
  
  <p>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 : <code>npm install lcd --save</code></p>
  
  <pre><code>cd ~/.node-red
  pi@raspberrypi ~/.node-red $ sudo node index.js
  </code></pre>
  
  <p>When I tested inside using the command it brings the time on the LCD.</p>
  
  <p>How to execute this index.js script in node-red node exec?</p>
  
  <p>I have tried but does not work.</p>
  
  <p><a href="http://i.stack.imgur.com/dC72b.png" rel="nofollow">node-red connection picture </a></p>
  
  <p><a href="http://i.stack.imgur.com/bSbj7.png" rel="nofollow">node exec config picture</a></p>
  
  <p>In inject node I entered string 1 as payload</p>
  
  <p>In exec node I entered command: <code>sudo /home/pi/.node-red/node index.js</code></p>
  
  <p>I tried in many ways to execute but no luck,</p>
  
  <p>please check the pictures and help me in this issue.</p>
  
  <p>Thanks a lot in advance</p>