-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode-red-o-tron.html
62 lines (53 loc) · 1.88 KB
/
node-red-o-tron.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
<script type="text/javascript">
RED.nodes.registerType('display-o-tron',{
category: 'function',
color: '#eaafff',
defaults: {
name: {value: "Display-O-Tron"},
backlight: {value: '#fff'},
contrast: {value: 50}
},
inputs:1,
outputs:1,
icon: "file.png",
label: function() {
return this.name||"display-o-tron";
}
});
</script>
<script type="text/x-red" data-template-name="display-o-tron">
<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-backlight"><i class="icon-tag"></i> Backlight Color</label>
<input type="text" id="node-input-backlight" placeholder="#ffffff">
</div>
<div class="form-row">
<label for="node-input-contrast"><i class="icon-tag"></i> LCD Contrast</label>
<input type="text" id="node-input-contrast" placeholder="50">
</div>
</script>
<script type="text/x-red" data-help-name="display-o-tron">
<p>Control Display-O-Tron Raspberry Pi Hats.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">array</span>
</dt>
<dd>Pass a payload with content set to an array of 3 strings, one for each line on the LCD.</dd>
</dl>
<dl class="message-properties">
<dt>config.backlight
<span class="property-type">array | optional</span>
</dt>
<dd>Pass a config with the backlight set to an array of 3 integers 0-255, one for each color channel in RGB.</dd>
</dl>
<dl class="message-properties">
<dt>config.contrast
<span class="property-type">integer | optional</span>
</dt>
<dd>Pass a config with the contrast set as an integer between 1-100.</dd>
</dl>
</script>