-
Notifications
You must be signed in to change notification settings - Fork 6
/
vl53l0x.html
44 lines (42 loc) · 1.69 KB
/
vl53l0x.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<script type="text/javascript">
RED.nodes.registerType('vl53l0x',{
category: 'advanced-input',
color: '#a6bbcf',
defaults: {
bus: {value:"1", required:true},
address: {value:"41", required:true, validate:RED.validators.number()},
interval: {value:"100", required:false, validate:RED.validators.number()},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "serial.png",
label: function() {
return this.name||"vl53l0x";
}
});
</script>
<script type="text/x-red" data-template-name="vl53l0x">
<div class="form-row">
<label for="node-input-bus"><i class="icon-asterisk"></i> Bus</label>
<select type="text" id="node-input-bus" style="width: 150px;">
<option value="0">ic2-0</option>
<option value="1">ic2-1</option>
</select>
</div>
<div class="form-row">
<label for="node-input-address"><i class="fa fa-address-card-o"></i> Bus Address</label>
<input type="number" id="node-input-address" class="vl53l0x-address" placeholder="Address" min=3 max=127>
</div>
<div class="form-row">
<label for="node-input-interval"><i class="icon-asterisk"></i> Poll Interval</label>
<input type="number" id="node-input-interval" class="vl53l0x-interval" placeholder="Interval" min=3 max=127>
</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="vl53l0x">
<p>A Node-RED node to talk to the vl53l0x on the I2C bus</p>
</script>