UNPKG

node-red-contrib-smartnode-dfrobot

Version:

this project dependences the node-red-contrib-smartnode package for basic function. based on the smartnode package, this package provide some sersor nodes for DFRobot sensors.

67 lines (61 loc) 3 kB
<!-- Copyright 2015 Maker Collider Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <script type="text/javascript"> RED.nodes.registerType('DF-IrFallPrevent', { category: 'DFRobot_IR', color: '#E2D96E', defaults: { name: {value: "IrFallPrevent", required: false}, digitalPin: {value: "0", required: false}, interval: {value: "300", required: false} }, inputs: 1, outputs: 1, icon: "light.png", label: function() { return this.name +' D' + this.digitalPin; }, paletteLabel: function () { return this.name||this._("IrFallPrevent.label.palette"); } }); </script> <script type="text/x-red" data-template-name="DF-IrFallPrevent"> <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> <div class="form-row"> <label for="node-input-digitalPin"><i class="fa fa-tag"></i> Digital Pin</label> <select id="node-input-digitalPin"> <option value=0>0</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> <option value=5>6</option> <option value=5>7</option> <option value=5>8</option> <option value=5>9</option> <option value=5>10</option> <option value=5>11</option> <option value=5>12</option> <option value=5>13</option> </select> </div> <div class="form-row"> <label for="node-input-interval"><i class="fa fa-tag"></i> Interval</label> <input type="number" id="node-input-interval"> </div> </script>