node-red-contrib-grove-base-hat-dtam
Version:
The node for Grove Base HAT for Raspberry Pi with extensions for the DTAM project.
47 lines (42 loc) • 1.63 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('grove-light-sensor-v1_2',{
category: 'grove-base-hat',
color: '#a6bbcf',
defaults: {
name: {value:""},
port_number: {value:0}
},
inputs:1,
outputs:1,
icon: "bridge.png",
label: function() {
return this.name||"grove-light-sensor-v1_2";
}
});
</script>
<script type="text/x-red" data-template-name="grove-light-sensor-v1_2">
<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="0">
<option value="0">A0</option>
<option value="2">A2</option>
<option value="4">A4</option>
<option value="6">A6</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-light-sensor-v1_2">
<p>The node controls Grove Light Sensor v1.2.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">number</span>
</dt>
<dd>the payload of detected Grove Light Sensor v1.2 data. The data unit publish as voltage.</dd>
<h3>Details</h3>
<p>This node listens to Grove Light Sensor v1.2 and publish the detected its sensor data.</p>
</script>