2015-11-01 15:59:21 +01:00
|
|
|
node-red-node-pisrf
|
|
|
|
===================
|
|
|
|
|
|
|
|
A <a href="http://nodered.org" target="_new">Node-RED</a> node for Raspberry Pi
|
|
|
|
to read range from an SRF05 Ultrasonic range sensor.
|
|
|
|
|
|
|
|
**Only** works with a Raspberry Pi.
|
|
|
|
|
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
2016-03-02 14:25:52 +01:00
|
|
|
Run the following command in your Node-RED user directory - typically `~/.node-red`
|
2015-11-01 15:59:21 +01:00
|
|
|
|
|
|
|
npm install node-red-node-pisrf
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
Raspberry Pi input from an SRF04 or SRF05 ultrasonic range finder.
|
|
|
|
|
2016-03-02 14:25:52 +01:00
|
|
|
The configuration requires two GPIO pin numbers, the trigger pin and the echo pin.
|
2015-11-01 15:59:21 +01:00
|
|
|
These can be any spare valid Pi GPIO pins. e.g.
|
|
|
|
|
|
|
|
7,11
|
|
|
|
|
2017-08-14 10:20:18 +02:00
|
|
|
You can also set the repeat frequency of measurements - default 0.5 seconds.
|
|
|
|
|
2016-03-02 14:25:52 +01:00
|
|
|
Outputs a `msg.payload` with a number representing the range in cm.
|
2015-11-01 15:59:21 +01:00
|
|
|
|
2017-08-14 10:20:18 +02:00
|
|
|
Produces one measure every 0.5s (by default) - but only if the distance is different from the previous reading.
|
2015-11-01 15:59:21 +01:00
|
|
|
|
|
|
|
**Note:** we are using the actual physical pin numbers on connector P1 as they are easier to locate.
|