mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
clean up arduino node readme. Add hint re rate limit or rbe.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
<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>For example you could use a <code>delay</code> node set to rate limit and drop intermediate values, or an <code>rbe</code> node to only report when it changes by a certain amount.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@@ -33,8 +33,8 @@ module.exports = function(RED) {
|
||||
if (node.board) {
|
||||
try {
|
||||
node.board.sp.close(function() {
|
||||
done();
|
||||
if (RED.settings.verbose) { node.log(RED._("arduino.status.portclosed")); }
|
||||
done();
|
||||
});
|
||||
}
|
||||
catch(e) { done(); }
|
||||
@@ -93,9 +93,6 @@ module.exports = function(RED) {
|
||||
}
|
||||
if (node.board.isReady) { doit(); }
|
||||
else { node.board.on("ready", function() { doit(); }); }
|
||||
node.on("close", function() {
|
||||
if (node.tout) { clearTimeout(node.tout); }
|
||||
})
|
||||
}
|
||||
else {
|
||||
this.warn(RED._("arduino.errors.portnotconf"));
|
||||
@@ -155,9 +152,6 @@ module.exports = function(RED) {
|
||||
}
|
||||
if (node.board.isReady) { doit(); }
|
||||
else { node.board.on("ready", function() { doit(); }); }
|
||||
node.on("close", function() {
|
||||
if (node.tout) { clearTimeout(node.tout); }
|
||||
})
|
||||
}
|
||||
else {
|
||||
this.warn(RED._("arduino.errors.portnotconf"));
|
||||
|
@@ -26,9 +26,7 @@ Connects to local Arduino and monitors the selected pin for changes.
|
||||
You can select either **Digital**, **Analogue**, or **String** input type.
|
||||
Outputs the value read as `msg.payload` and the pin number as `msg.topic`.
|
||||
|
||||
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.
|
||||
|
||||
You can set the sample rate from `20` to `65535` mS.
|
||||
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. For example you could use a `delay` node set to rate limit and drop intermediate values, or an `rbe` node to only report when it changes by a certain amount.
|
||||
|
||||
### Output Node
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-arduino",
|
||||
"version" : "0.0.16",
|
||||
"version" : "0.0.17",
|
||||
"description" : "A Node-RED node to talk to an Arduino running firmata",
|
||||
"dependencies" : {
|
||||
"firmata" : "~0.19.1"
|
||||
|
Reference in New Issue
Block a user