Update Pi Hardware nodes that call python

Pibrella, PiLiter, PiLcd
This commit is contained in:
Dave Conway-Jones
2015-12-12 16:33:39 +00:00
parent 11dfcd4a46
commit 1a9da583f1
8 changed files with 94 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ module.exports = function(RED) {
var spawn = require('child_process').spawn;
var fs = require('fs');
var gpioCommand = __dirname+'/nrgpio';
var gpioCommand = __dirname+'/nrgpio.py';
if (!fs.existsSync("/dev/ttyAMA0")) { // unlikely if not on a Pi
//util.log("Info : Ignoring Raspberry Pi specific node.");
@@ -34,7 +34,7 @@ module.exports = function(RED) {
if ( !(1 & parseInt ((fs.statSync(gpioCommand).mode & parseInt ("777", 8)).toString (8)[0]) )) {
util.log("[rpi-gpio] Error : "+gpioCommand+" needs to be executable.");
throw "Error : nrgpio must to be executable.";
throw "Error : " + gpioCommand + " must to be executable.";
}
function PiLiter(n) {

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-piliter",
"version" : "0.0.7",
"version" : "0.0.8",
"description" : "A Node-RED node to drive a Raspberry Pi Pi-LITEr 8 LED board.",
"dependencies" : {
},