-
Notifications
You must be signed in to change notification settings - Fork 8
/
i2clcd.html
38 lines (33 loc) · 1.31 KB
/
i2clcd.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
<script type="text/x-red" data-template-name="i2clcd">
<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>
</script>
<script type="text/x-red" data-help-name="i2clcd">
<p>write to 1602 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 (shows static greeting) or <i>clear</i> to wipe. </p>
<p>inject message with <b>msg.topic</b> set to <i>on/off</i> to set backlight</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('i2clcd',{
category: 'output',
color: "#2C75FF",
defaults: {
name: {value:"1602 LCD"},
addr: {value:"0x3f",required:true}
},
inputs:1,
outputs:1,
icon: "arrow-out.png",
align: 'right',
label: function() {
return this.name||"i2clcd";
}
});
</script>