1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

point blinkstick to latest pre-req

and remove rtf tags
This commit is contained in:
Dave Conway-Jones 2016-02-22 18:56:42 +00:00
parent b33571b240
commit fa1453c0d4
4 changed files with 25 additions and 13 deletions

View File

@ -34,22 +34,22 @@
<div id="delay-details" class="form-row">
<label for="node-input-delay"><i class="fa fa-clock-o"></i> Delay</label>
<input type="text" id="node-input-delay" placeholder="Delay" style="direction:rtl; width:50px !important">
<input type="text" id="node-input-delay" placeholder="Delay" style="text-align:right; width:50px !important">
milliseconds
</div>
<div id="repeats-details" class="form-row">
<label for="node-input-repeats"><i class="fa fa-history"></i> Repeats</label>
<input type="text" id="node-input-repeats" placeholder="Times" style="direction:rtl; width:50px !important">
<input type="text" id="node-input-repeats" placeholder="Times" style="text-align:right; width:50px !important">
</div>
<div id="duration-details" class="form-row">
<label for="node-input-duration"><i class="fa fa-clock-o"></i> Duration</label>
<input type="text" id="node-input-duration" placeholder="Duration" style="direction:rtl; width:50px !important">
<input type="text" id="node-input-duration" placeholder="Duration" style="text-align:right; width:50px !important">
milliseconds
</div>
<div id="steps-details" class="form-row">
<label for="node-input-steps"><i class="fa fa-history"></i> Steps</label>
<input type="text" id="node-input-steps" placeholder="Steps" style="direction:rtl; width:50px !important">
<input type="text" id="node-input-steps" placeholder="Steps" style="text-align:right; width:50px !important">
</div>
<div id="repeat-details" class="form-row">
<label>&nbsp;</label>
@ -64,17 +64,17 @@
</script>
<script type="text/x-red" data-help-name="blinkstick">
<p><i><a href="http://www.blinkstick.com" target="_new">BlinkStick</a></i> output node. Expects a <b>msg.payload</b> with one of:</p>
<p><i><a href="http://www.blinkstick.com" target="_new">BlinkStick</a></i> output node. Expects a <code>msg.payload</code> with one of:</p>
<ul>
<li>A hex string <b>"#rrggbb"</b> triple</li>
<li><b>"red,green,blue"</b> three 0-255 values as a string</li>
<li><b>"random"</b> will generate a random color</li>
<li><i><a href="http://www.w3schools.com/html/html_colornames.asp" target="_new">Standard HTML color</a></i> name</li>
<li><b>object</b> can override any of the parameters</li>
<li>An <b>object</b> can override any of the parameters</li>
<li><b>array</b> of colours for a neopixel rgb strip - either name,name,... or r,g,b,r,g,b,... where r,g,b are 0 to 255.</li>
</ul>
<p>If using a neopixel strip it <i>must</i> be wired to the red or R channel of the blinkstick.</p>
<p>An object payload can override any of the settings on the node. Omitted parameters are left intact. For example:</p>
<p>An <b>object</b> payload can override any of the settings on the node. Omitted parameters are left intact. For example:</p>
<pre>
{ 'color': 'blue' }
{ 'task': 'blink', 'color': 'red' }

View File

@ -253,6 +253,7 @@ module.exports = function(RED) {
//Sanitize color value
node.color = msg.payload.toLowerCase().replace(/\s+/g,'');
if (node.color === "amber") { node.color = "#FFBF00"; }
if (node.color === "off") { node.color = "#000000"; }
}
if (Object.size(node.led) !== 0) {

View File

@ -3,14 +3,27 @@ node-red-node-blinkstick
A <a href="http://nodered.org" target="_new">Node-RED</a> node to control a <a href="http://www.blinkstick.com/" target="_new">BlinkStick</a>.
Pre-requisites
--------------
Depending on your operating system you may need to install some extra libraries before installing this node... I.E make sure it works outside of Node-RED first !
For more information see <i><a href="http://www.blinkstick.com/help/tutorials" target="_new">BlinkStick tutorials</a></i> or the <i><a href="https://github.com/arvydas/blinkstick-node" target="_new">node module</a></i> documentation.
#### Raspberry Pi / Debian / Ubuntu
sudo apt-get install -y libudev-dev
Currently you **MUST** run Node-RED as root in order to get sufficient permissions to talk to this USB driver.
Install
-------
Run the following command in the root directory of your Node-RED install:
Run the following command in the root directory of your Node-RED install.
Usually the is `~/.node-red`
npm install node-red-node-blinkstick
Usage
-----
@ -28,5 +41,3 @@ An object payload can override any of the settings on the node. Omitted paramete
{ 'task': 'blink', 'color': 'red' }
{ 'task': 'pulse', 'color': 'gree', 'duration': 500 }
{ 'task': 'morph', 'color': 'orange', 'duration': 500, 'steps': 20 }
For more information see <i><a href="http://www.blinkstick.com/help/tutorials" target="_new">BlinkStick tutorials</a></i> or the <i><a href="https://github.com/arvydas/blinkstick-node" target="_new">node module</a></i> documentation.

View File

@ -1,9 +1,9 @@
{
"name" : "node-red-node-blinkstick",
"version" : "0.1.8",
"version" : "0.1.10",
"description" : "A Node-RED node to control a Blinkstick",
"dependencies" : {
"blinkstick" : "1.1.*"
"blinkstick" : "1.1.3"
},
"repository" : {
"type":"git",