UNPKG

node-red-contrib-nunchuck

Version:
35 lines (32 loc) 1.17 kB
<script type="text/x-red" data-template-name="nunchuck"> <div class="form-row"> <label for="node-input-frequency"><i class="fa fa-repeat"></i> Frequency (in ms)</label> <input type="text" id="node-input-frequency" placeholder="100"> </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="nunchuck"> <p>Read nunchuck data stream and send event on output nodes when something changes.</p> </script> <script type="text/javascript"> RED.nodes.registerType('nunchuck',{ category: 'input', color:"#fdf0c2", defaults: { name: {value:""}, frequency: {value:"10", required:true, validate:RED.validators.number()} }, inputs:0, outputs:1, icon: "rpi.png", label: function() { return this.name||'nunchuck'; }, labelStyle: function() { return this.name?"node_label_italic":""; } }); </script>