mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
bump serial port to 4.0.3 library
This commit is contained in:
parent
cebeab02f9
commit
36e834fdf1
@ -42,7 +42,6 @@
|
||||
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
|
||||
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</p>
|
||||
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
|
||||
<p>You can set the sample rate from 20 to 65535 mS.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -218,13 +218,14 @@ module.exports = function(RED) {
|
||||
//newline = newline.replace("\\n","\n").replace("\\r","\r");
|
||||
var olderr = "";
|
||||
var setupSerial = function() {
|
||||
obj.serial = new serialp.SerialPort(port,{
|
||||
obj.serial = new serialp(port,{
|
||||
baudrate: baud,
|
||||
databits: databits,
|
||||
parity: parity,
|
||||
stopbits: stopbits,
|
||||
parser: serialp.parsers.raw
|
||||
},true, function(err, results) {
|
||||
parser: serialp.parsers.raw,
|
||||
autoOpen: true
|
||||
}, function(err, results) {
|
||||
if (err) {
|
||||
if (err.toString() !== olderr) {
|
||||
olderr = err.toString();
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-serialport",
|
||||
"version" : "0.3.0",
|
||||
"version" : "0.4.0",
|
||||
"description" : "Node-RED nodes to talk to serial ports",
|
||||
"dependencies" : {
|
||||
"serialport" : "~3.1.2"
|
||||
"serialport" : "~4.0.3"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
|
Loading…
Reference in New Issue
Block a user