mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Update Pi Hardware nodes that call python
Pibrella, PiLiter, PiLcd
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user