UNPKG

node-red-contrib-grove-base-hat-dtam

Version:

The node for Grove Base HAT for Raspberry Pi with extensions for the DTAM project.

44 lines (40 loc) 1.8 kB
<script type="text/javascript"> RED.nodes.registerType('grove-servo',{ category: 'grove-base-hat', color: '#a6bbcf', defaults: { name: {value:""}, port_number: {value:5} }, inputs:1, outputs:0, icon: "light.png", label: function() { return this.name||"grove-servo"; } }); </script> <script type="text/x-red" data-template-name="grove-servo"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Port</label> <select style="width:90px; margin-left:20px;" id="node-input-port_number" value="12"> <option value="18">D18</option> <option value="12">PWM</option> </select> </div> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="grove-servo"> <p>The node controls Grove LED.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">number</span> </dt> <dd> the payload of the message to publish.</dd> <h3>Details</h3> <p>This node controls Grove Servo. The payload can control servo degree. For example when the payload is 60, The node set 60 degree it. This controling time is for about 1.00 sec because its based python control continue to touching PWM using ChangeDutyCycle. Then the 1.00 sec time is 20 times touching. In this case the 1.00 sec time is 20 times touching. Its count is almost no problem and a little over count. This is next brushup-point maybe. :)</p> </script>