2013-09-27 15:37:44 +02:00
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="digiRGB">
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<input type="text" id="node-input-name" placeholder="DigiSpark">
|
2013-09-27 15:37:44 +02:00
|
|
|
</div>
|
2016-03-02 14:25:52 +01:00
|
|
|
<div class="form-tips">Expects a <code>msg.payload</code> with three part csv string of r,g,b.</div>
|
2013-09-27 15:37:44 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="digiRGB">
|
2013-11-10 18:01:19 +01:00
|
|
|
<p>Simple output node to drive digispark RGB</p>
|
2016-03-02 14:25:52 +01:00
|
|
|
<p>Requires <code>msg.payload</code> to be of the form 'r,g,b' decimals 0-255, or a hex string "#rrggbb". For example:</p>
|
2015-03-12 14:54:20 +01:00
|
|
|
<ul><li>Red : "255,0,0"</li><li>Green : "#00FF00"</li></ul>
|
2013-09-27 15:37:44 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('digiRGB',{
|
2013-11-10 18:01:19 +01:00
|
|
|
category: 'output',
|
2013-09-27 15:37:44 +02:00
|
|
|
color:"GoldenRod",
|
2013-11-10 18:01:19 +01:00
|
|
|
defaults: {
|
|
|
|
name: {value:""}
|
2013-09-27 15:37:44 +02:00
|
|
|
},
|
2013-11-10 18:01:19 +01:00
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
icon: "light.png",
|
2013-09-27 15:37:44 +02:00
|
|
|
align: "right",
|
2013-11-10 18:01:19 +01:00
|
|
|
label: function() {
|
|
|
|
return this.name||"digiSparkRGB";
|
2013-09-27 15:37:44 +02:00
|
|
|
},
|
2013-11-10 18:01:19 +01:00
|
|
|
labelStyle: function() {
|
2013-09-27 15:37:44 +02:00
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|