-
Notifications
You must be signed in to change notification settings - Fork 1
/
soil.html
69 lines (68 loc) · 1.73 KB
/
soil.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<script type='text/javascript'>
(function () {
'use strict';
RED.nodes.registerType('soil', {
category: 'Webduino',
color: '#c6dbef',
inputs: 1,
outputs: 1,
defaults: {
board: {
type: 'board',
required: true
},
pin: {
value: '5',
required: true
},
autoStart: {
value: ''
},
samplingInterval: {
value: '100'
}
},
icon: 'icon.png',
label: function () {
return 'soil (' + this.pin + ')';
}
});
}());
</script>
<script type="text/x-red" data-template-name="soil">
<div class="form-row">
<label for="node-input-board">Board</label>
<input type="text" id="node-input-board">
</div>
<div class="form-row">
<label for="node-input-pin">Pin</label>
<select type="text" id="node-input-pin">
<option value="0">A0</option>
<option value="1">A1</option>
<option value="2">A2</option>
<option value="3">A3</option>
<option value="4">A4</option>
<option value="5">A5</option>
</select>
</div>
<div class="form-row">
<label for="node-input-autoStart">Auto Start</label>
<select type="text" id="node-input-autoStart">
<option value="True">True</option>
<option value="">False</option>
</select>
</div>
<div class="form-row">
<label for="node-input-samplingInterval">Sampling Interval</label>
<input type="text" id="node-input-samplingInterval" style="width:50px">
</div>
</script>
<script type="text/x-red" data-help-name="soil">
<p>Send messages to control a soil sensor.</p>
<p>msg.payload = <b>method<i>[, parameter list...]</i></b>
<ul>
<li><b>on</b> - Start</li>
<li><b>off</b> - Stop</li>
</ul>
</p>
</script>