mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Bump arduino node to latest firmata and serialport
shoudl work better with nodejs 10
This commit is contained in:
parent
602586ad82
commit
c1650b5d47
@ -11,7 +11,7 @@ module.exports = function(RED) {
|
|||||||
this.device = n.device || null;
|
this.device = n.device || null;
|
||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
node.board = Board(node.device, function(e) {
|
node.board = new Board(node.device, function(e) {
|
||||||
//console.log("ERR",e);
|
//console.log("ERR",e);
|
||||||
if ((e !== undefined) && (e.toString().indexOf("cannot open") !== -1) ) {
|
if ((e !== undefined) && (e.toString().indexOf("cannot open") !== -1) ) {
|
||||||
node.error(RED._("arduino.errors.portnotfound",{device:node.device}));
|
node.error(RED._("arduino.errors.portnotfound",{device:node.device}));
|
||||||
@ -32,7 +32,7 @@ module.exports = function(RED) {
|
|||||||
node.on('close', function(done) {
|
node.on('close', function(done) {
|
||||||
if (node.board) {
|
if (node.board) {
|
||||||
try {
|
try {
|
||||||
node.board.sp.close(function() {
|
node.board.transport.close(function() {
|
||||||
if (RED.settings.verbose) { node.log(RED._("arduino.status.portclosed")); }
|
if (RED.settings.verbose) { node.log(RED._("arduino.status.portclosed")); }
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -172,6 +172,5 @@ module.exports = function(RED) {
|
|||||||
SP.list(function(error, ports) {
|
SP.list(function(error, ports) {
|
||||||
res.json(ports);
|
res.json(ports);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ Arduino running standard firmata 2.2 or better.
|
|||||||
Install
|
Install
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Run the following command in your Node-RED user directory - typically `~/.node-red`
|
Either use the Menu - Manage Palette option or run the following command in your Node-RED user directory - typically `~/.node-red`
|
||||||
|
|
||||||
npm i --unsafe-perm node-red-node-arduino
|
npm i --unsafe-perm node-red-node-arduino
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-arduino",
|
"name" : "node-red-node-arduino",
|
||||||
"version" : "0.0.18",
|
"version" : "0.1.0",
|
||||||
"description" : "A Node-RED node to talk to an Arduino running firmata",
|
"description" : "A Node-RED node to talk to an Arduino running firmata",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"firmata" : "~0.19.1"
|
"firmata" : "^2.0.0"
|
||||||
},
|
},
|
||||||
"repository" : {
|
"repository" : {
|
||||||
"type":"git",
|
"type":"git",
|
||||||
@ -16,6 +16,7 @@
|
|||||||
"arduino": "35-arduino.js"
|
"arduino": "35-arduino.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"engines" : { "node" : ">=8" },
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Dave Conway-Jones",
|
"name": "Dave Conway-Jones",
|
||||||
"email": "ceejay@vnet.ibm.com",
|
"email": "ceejay@vnet.ibm.com",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user