node-red-nodes/hardware/PiSrf/pisrf.html

57 lines
2.4 KiB
HTML
Raw Normal View History

<script type="text/x-red" data-template-name="rpi-srf">
<div class="form-row">
<label for="node-input-pins"><i class="fa fa-circle"></i> Pins</label>
<input type="text" id="node-input-pins" placeholder="Trigger,Echo">
</div>
<div class="form-row">
<label for="node-input-pulse"><i class="fa fa-clock-o"></i> Repeat (S)</label>
<input type="text" id="node-input-pulse" placeholder="time between readings">
PiSrf: Added decimal places option + stop bugfix + more keywords (#816) * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
2021-07-08 09:32:55 +02:00
</div>
<div class="form-row">
<label for="node-input-precision"><i class="fa fa-balance-scale"></i>Decimal Places</label>
<input type="text" id="node-input-precision" placeholder="decimal places 0 or 1">
</div>
2017-05-13 13:46:24 +02:00
<div class="form-row">
<label for="node-input-topic"><i class="fa fa-bars"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="optional topic">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips"><b>Tip</b>: Pins MUST be a comma separated list of the 2 GPIO
connector pin numbers that are connected to the Trigger and Echo pins of the SRF04 or SRF05.</div>
</script>
<script type="text/x-red" data-help-name="rpi-srf">
<p>Raspberry Pi input from an SRF04 or SRF05 ultrasonic range finder.</p>
2016-03-02 14:25:52 +01:00
<p>Outputs a <code>msg.payload</code> with a number representing the range in cm.</p>
<p>Produces one measurement every 0.5s (default) - but only if the distance is different from the previous reading.</p>
PiSrf: Added decimal places option + stop bugfix + more keywords (#816) * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
2021-07-08 09:32:55 +02:00
<p>You can specify resolution up to one decimal place.</p>
<p><b>Note:</b> we are using the actual physical pin numbers on connector P1 as they are easier to locate.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('rpi-srf',{
category: 'Raspberry Pi',
color:"#c6dbef",
defaults: {
name: { value:"" },
2017-05-13 13:46:24 +02:00
topic: { value:"SRF" },
pulse: {value:"0.5" },
PiSrf: Added decimal places option + stop bugfix + more keywords (#816) * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
2021-07-08 09:32:55 +02:00
pins: { value:"", required:true, validate:RED.validators.regex(/^\d+,\d+$/) },
precision: {value:"0", validate:RED.validators.regex(/^0|1|^$/)}
},
inputs:0,
outputs:1,
icon:"rpi.png",
label:function() {
return this.name||"Pi SRF";
},
labelStyle:function() {
return this.name?"node_label_italic":"";
}
});
</script>