mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
detect Pi updates for LEDborg, mcp3008 and neopixel
This commit is contained in:
@@ -24,9 +24,11 @@ module.exports = function(RED) {
|
||||
|
||||
var gpioCommand = __dirname+'/nrgpio';
|
||||
|
||||
if (!fs.existsSync("/dev/ttyAMA0")) { // unlikely if not on a Pi
|
||||
//util.log("Info : Ignoring Raspberry LEDborg specific node.");
|
||||
throw "Info : Ignoring Raspberry LEDborg specific node.";
|
||||
try {
|
||||
var cpuinfo = fs.readFileSync("/proc/cpuinfo").toString();
|
||||
if (cpuinfo.indexOf(": BCM") === -1) { throw "Info : "+RED._("rpi-gpio.errors.ignorenode"); }
|
||||
} catch(err) {
|
||||
throw "Info : "+RED._("rpi-gpio.errors.ignorenode");
|
||||
}
|
||||
|
||||
if (!fs.existsSync("/usr/share/doc/python-rpi.gpio")) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-ledborg",
|
||||
"version" : "0.0.15",
|
||||
"version" : "0.0.16",
|
||||
"description" : "A Node-RED node to control a PiBorg LedBorg board for a Raspberry Pi.",
|
||||
"dependencies" : {
|
||||
},
|
||||
|
Reference in New Issue
Block a user