@@ -4,7 +4,7 @@ | |||
<a href="http://eepurl.com/gJm095" target="_blank">Subscribe to my channel.</a> Only news about my nodes, no spam, no ads. I'm a github developer, not a merchant. | |||
<p> | |||
<b>Version 1.0.13</b><br/> | |||
<b>Version 1.0.14</b><br/> | |||
- NEW: added blinker node. Thanks to @Marco for the suggestion.</br> | |||
</p> | |||
<p> |
@@ -111,6 +111,7 @@ The input message is preserved and passed to the output pin, changing only the t | |||
The pourpose of this node is to blink a led or something.<br /> | |||
Pass <code>msg.payload = true</code> to start blinking</br> | |||
Pass <code>msg.payload = false</code> to stop blinking</br> | |||
Pass <code>msg.interval = 2000</code> to change the blinking interval</br> | |||
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/blinker.png' width='60%'> | |||
@@ -44,6 +44,7 @@ | |||
<p>The meaning of this node is to blink a light or something else.<br/> | |||
<p>Pass msg.payload = true to start blinking</br> | |||
Pass msg.payload = false to stop blinking</br> | |||
Pass msg.interval = 2000 to change the blinking interval</br> | |||
</p> | |||
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a> | |||
@@ -20,8 +20,17 @@ module.exports = function (RED) { | |||
if (node.tBlinker !== null) clearInterval(node.tBlinker); | |||
setNodeStatus({ fill: "red", shape: "dot", text: "|| Off" }); | |||
node.send({ payload: false }); | |||
node.curPayload = false; | |||
} | |||
} | |||
if (msg.hasOwnProperty("interval")) { | |||
try { | |||
node.blinkfrequency = msg.interval; | |||
} catch (error) { | |||
node.blinkfrequency = 500; | |||
setNodeStatus({ fill: "red", shape: "dot", text: "Invalid interval received" }); | |||
} | |||
} | |||
}); | |||
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "node-red-contrib-boolean-logic-ultimate", | |||
"version": "1.0.13", | |||
"version": "1.0.14", | |||
"description": "A set of Node-RED enhanced boolean logic, with persisten values after reboot and more", | |||
"author": "Supergiovane (https://github.com/Supergiovane)", | |||
"dependencies": { |