-
Notifications
You must be signed in to change notification settings - Fork 0
/
i2clcd-alt.html
53 lines (49 loc) · 2.08 KB
/
i2clcd-alt.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
<script type="text/x-red" data-template-name="i2clcd-alt">
<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-addr"><i class="icon-asterisk"></i> i2c address</label>
<input type="text" id="node-input-addr" placeholder="Address">
</div>
<div class="form-row">
<label for="node-input-bus"><i class="icon-asterisk"></i> i2c bus number</label>
<input type="text" id="node-input-bus" placeholder="Bus">
</div>
<div class="form-row">
<label for="node-input-numcols"><i class="icon-asterisk"></i> LCD columns</label>
<input type="text" id="node-input-numcols" placeholder="Columns">
</div>
<div class="form-row">
<label for="node-input-numrows"><i class="icon-asterisk"></i> LCD rows</label>
<input type="text" id="node-input-numrows" placeholder="Rows">
</div>
</script>
<script type="text/x-red" data-help-name="i2clcd-alt">
<p>Write to LCD with i2c backpack</p>
<p>Inject message with <b>msg.topic</b> as <i>line1</i> to <i>line4</i> and prints <b>msg.payload</b> to each line</p>
<p>Inject message with <b>msg.topic</b> set to <i>init</i> to reinitialize screen</p>
<p>Inject message with <b>msg.topic</b> set to <i>clear</i> to clear screen</p>
<p>Inject message with <b>msg.topic</b> set to <i>on</i> or <i>off</i> to turn screen on or off</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('i2clcd-alt',{
category: 'output',
color: "#2C75FF",
defaults: {
name: {value:"i2clcd-alt"},
addr: {value:"0x3f",required:true},
bus: {value:"0",required:true},
numcols: {value:"20",required:true},
numrows: {value:"4",required:true}
},
inputs:1,
outputs:1,
icon: "arrow-out.png",
align: 'right',
label: function() {
return this.name||"i2clcd-alt";
}
});
</script>