UNPKG

node-red-contrib-ledmatrix

Version:

Contains the nodes used in TimeSquAir to use the LEDMatrix library

55 lines (50 loc) 1.93 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="ledmatrix"> <div class="form-row"> <label for="node-input-speed">Speed</label> <input type="text" id="node-input-speed"> </div> <div class="form-row"> <label for="node-input-time">Time</label> <input type="text" id="node-input-time"> </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="ledmatrix"> <p>Display into a led matrix</p> <p>Display content provide by <b>led blank</b>, <b>led picture</b> and <b>led text</b>.</p> <p>You can change the speed property by sending a value in msg.speed</p> <p>You can set the value of msg.speed between 1(slow) and 5(fast), default</p> <p>You can send 0 to prevent the message from moving</p> <p>You can change the time property by sending a value in msg.time</p> </script> <script type="text/javascript"> RED.nodes.registerType('ledmatrix',{ category: "ledmatrix", defaults: { speed: { value: 50, validate: RED.validators.number() }, time: { value: 500, validate: RED.validators.number() }, name: { value: "" } }, inputs:1, outputs:0, color: "#4caf50", paletteLabel: "ledmatrix", icon: "ledmatrix.png", label: function() { return this.name || "ledmatrix"; }, labelStyle: function() { return this.name ? "node_label_italic":""; } }); </script>