2016-03-02 00:21:44 +01:00
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="rpi-sensehat in">
|
2021-03-12 14:17:23 +01:00
|
|
|
<div class="form-row">
|
|
|
|
<label><i class="fa fa-arrow-right"></i> <span data-i18n="sensehat.label.outputs"></label>
|
|
|
|
<label style="width: auto" for="node-input-motion"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-motion"> <span data-i18n="sensehat.label.motionEvents"></label>
|
|
|
|
<div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.motionEventsExamples"></div>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label></label>
|
|
|
|
<label style="width: auto" for="node-input-env"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-env"> <span data-i18n="sensehat.label.environmentEvents"></label>
|
|
|
|
<div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.environmentEventsExamples"></div>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label></label>
|
|
|
|
<label style="width: auto" for="node-input-stick"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-stick"> <span data-i18n="sensehat.label.joystickEvents"></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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>
|
2016-03-02 00:21:44 +01:00
|
|
|
</script>
|
|
|
|
|
2016-03-04 18:12:02 +01:00
|
|
|
<script type="text/x-red" data-template-name="rpi-sensehat out">
|
2021-03-12 14:17:23 +01:00
|
|
|
<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>
|
2016-03-04 18:12:02 +01:00
|
|
|
</script>
|
2016-03-02 00:21:44 +01:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('rpi-sensehat in',{
|
|
|
|
category: 'Raspberry Pi',
|
|
|
|
paletteLabel: "Sense HAT",
|
|
|
|
color:"#c6dbef",
|
|
|
|
defaults: {
|
|
|
|
name: { value:"" },
|
|
|
|
motion: { value: true },
|
|
|
|
env: { value: true },
|
|
|
|
stick: { value: true }
|
|
|
|
},
|
|
|
|
inputs:0,
|
|
|
|
outputs:1,
|
|
|
|
icon: "rpi.png",
|
|
|
|
label: function() {
|
|
|
|
return this.name||"Sense HAT";
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
2016-03-04 18:12:02 +01:00
|
|
|
|
|
|
|
RED.nodes.registerType('rpi-sensehat out',{
|
|
|
|
category: 'Raspberry Pi',
|
|
|
|
paletteLabel: "Sense HAT",
|
|
|
|
color:"#c6dbef",
|
|
|
|
defaults: {
|
|
|
|
name: { value:"" },
|
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
icon: "rpi.png",
|
|
|
|
align: "right",
|
|
|
|
label: function() {
|
|
|
|
return this.name||"Sense HAT";
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
2016-03-02 00:21:44 +01:00
|
|
|
</script>
|