node-red-contrib-sphero
Version:
A Node-RED node capable of establishing connection with Sphero droid and sending commands to it
37 lines (35 loc) • 1.26 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('sphero-connection', {
category: 'config',
color: '#a6bbcf',
defaults: {
name: {value: ''},
uuid: {
value: '', required: true
},
ollie: {value: false},
disabled: {value: false}
},
label: function() {
return this.name || this.uuid || 'sphero-connection';
}
});
</script>
<script type="text/x-red" data-template-name="sphero-connection">
<div class="form-row">
<label for="node-config-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-config-input-uuid"><i class="icon-bookmark"></i> Droid UUID</label>
<input type="text" id="node-config-input-uuid" placeholder="UUID">
</div>
<div class="form-row">
<label for="node-config-input-ollie"><i class="fa fa-circle"></i> Ollie</label>
<input type="checkbox" id="node-config-input-ollie" placeholder="Ollie">
</div>
<div class="form-row">
<label for="node-config-input-disabled"><i class="fa fa-power-off"></i> Disabled</label>
<input type="checkbox" id="node-config-input-disabled" placeholder="Disabled">
</div>
</script>