1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/PiLcd/pilcd.html
2020-06-15 23:11:53 +01:00

34 lines
1.2 KiB
HTML

<script type="text/x-red" data-template-name="rpi-lcd">
<div class="form-row">
<label for="node-input-pins"><i class="fa fa-circle"></i> <span data-i18n="pilcd.label.pins"></label>
<input type="text" id="node-input-pins" placeholder="RS,E,D4,D5,D6,D7">
</div>
<br/>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-tips" data-i18n="[html]pilcd.tip.tip"></div>
</script>
<script type="text/javascript">
RED.nodes.registerType('rpi-lcd',{
category: 'Raspberry Pi',
color:"#c6dbef",
defaults: {
name: { value:"" },
pins: { value:"", required:true, validate:RED.validators.regex(/^\d+,\d+,\d+,\d+,\d+,\d+$/) }
},
inputs:1,
outputs:0,
align:"right",
icon:"rpi.png",
label:function() {
return this.name||"Pi LCD";
},
labelStyle:function() {
return this.name?"node_label_italic":"";
}
});
</script>