forked from Harsch-Systems/node-red-contrib-pi-plates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadc.html
47 lines (45 loc) · 1.59 KB
/
adc.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
45
46
47
<script type="text/javascript">
RED.nodes.registerType('ppADC', {
category: 'Pi_Plates',
color: '#87A980',
defaults: {
config_plate: { value: '', type: "pi_plate"},
name: { value: ''},
channel: { value: "1", required: true}
},
inputs: 1,
outputs: 1,
icon: 'analog.svg',
paletteLabel: 'ADC',
label: function () {
return (this.name || 'ADC' + this.channel);
}
});
</script>
<script type="text/x-red" data-template-name="ppADC">
<div class="form-row">
<label for="node-input-config_plate"><i class="icon-tag"></i> Plate</label>
<input type="text" id="node-input-config_plate">
</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>
<div class="form-row">
<label for="node-input-channel"><i class="icon-tag"></i> Channel #</label>
<select id="node-input-channel">
<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="6">6</option>
<option value="7">7</option>
<option value="8">5V Power Supply</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="ppADC">
<p>ADCs convert analog voltage signals into numeric values</p>
</script>