Browse Source

Blinking Node inteval

master
Massimo 4 years ago
parent
commit
c8e93985d4
5 changed files with 13 additions and 2 deletions
  1. +1
    -1
      CHANGELOG.md
  2. +1
    -0
      README.md
  3. +1
    -0
      boolean-logic-ultimate/BlinkerUltimate.html
  4. +9
    -0
      boolean-logic-ultimate/BlinkerUltimate.js
  5. +1
    -1
      package.json

+ 1
- 1
CHANGELOG.md View File

<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. <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> <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> - NEW: added blinker node. Thanks to @Marco for the suggestion.</br>
</p> </p>
<p> <p>

+ 1
- 0
README.md View File

The pourpose of this node is to blink a led or something.<br /> 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 = true</code> to start blinking</br>
Pass <code>msg.payload = false</code> to stop 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%'> <img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/blinker.png' width='60%'>



+ 1
- 0
boolean-logic-ultimate/BlinkerUltimate.html View File

<p>The meaning of this node is to blink a light or something else.<br/> <p>The meaning of this node is to blink a light or something else.<br/>
<p>Pass msg.payload = true to start blinking</br> <p>Pass msg.payload = true to start blinking</br>
Pass msg.payload = false to stop blinking</br> Pass msg.payload = false to stop blinking</br>
Pass msg.interval = 2000 to change the blinking interval</br>
</p> </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> <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>



+ 9
- 0
boolean-logic-ultimate/BlinkerUltimate.js View File

if (node.tBlinker !== null) clearInterval(node.tBlinker); if (node.tBlinker !== null) clearInterval(node.tBlinker);
setNodeStatus({ fill: "red", shape: "dot", text: "|| Off" }); setNodeStatus({ fill: "red", shape: "dot", text: "|| Off" });
node.send({ payload: false }); 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
- 1
package.json View File

{ {
"name": "node-red-contrib-boolean-logic-ultimate", "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", "description": "A set of Node-RED enhanced boolean logic, with persisten values after reboot and more",
"author": "Supergiovane (https://github.com/Supergiovane)", "author": "Supergiovane (https://github.com/Supergiovane)",
"dependencies": { "dependencies": {

Loading…
Cancel
Save