UNPKG

node-red-contrib-ledmatrix

Version:

Contains the nodes used in TimeSquAir to use the LEDMatrix library

50 lines (46 loc) 1.74 kB
<!-- Copyright © 2015 Digital Airways (www.DigitalAirways.com) This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net for more details. --> <script type="text/x-red" data-template-name="ledtext"> <div class="form-row"> <label for="node-input-text">Text</label> <input type="text" id="node-input-text" placeholder="Hello World !"> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="ledtext"> <p>Add a text to the ledmatrix</p> <p>Add to <b>msg.cmd</b> shell script for display text into a led matrix.</p> <p>Default color is white</p> <p>You can set the text content with <b>msg.payload</b>.</p> <p>You can set the text color with <b>msg.color</b>.</p> <p>You can set the text brightness intensity with <b>msg.intensity</b>.</p> <p>You can set the text size (between 1 and 5 ) with <b>msg.size</b> (default size is 3)</p> </script> <script type="text/javascript"> RED.nodes.registerType('ledtext',{ category: "ledmatrix", defaults: { name: { value: "" }, text: { value: "" } }, inputs:1, outputs:1, color: "#2196f3", paletteLabel: "led text", icon: "ledtext.png", label: function() { return this.name || this.text || "led text"; }, labelStyle: function() { return this.name ? "node_label_italic":""; } }); </script>