node-red-nodes/hardware/PiSrf
Dave Conway-Jones 2ef447dfeb Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
..
LICENSE Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
README.md Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
nrsrf Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
nrsrf.py Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
package.json Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
pisrf.html Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00
pisrf.js Add PiSRF node - reads SRF05 (or 04) Ultrasonic range module 2015-11-01 14:59:21 +00:00

README.md

node-red-node-pisrf

A Node-RED node for Raspberry Pi to read range from an SRF05 Ultrasonic range sensor.

Only works with a Raspberry Pi.

Install

Run the following command in the root directory of your Node-RED install. This is usually ~/.node-red

npm install node-red-node-pisrf

Usage

Raspberry Pi input from an SRF04 or SRF05 ultrasonic range finder.

The configuartion requires two GPIO pin numbers, the trigger pin and the echo pin. These can be any spare valid Pi GPIO pins. e.g.

    7,11

Outputs a msg.payload with a number representing the range in cm.

Produces one measure every 0.5s - but only if the distance is different from the previous reading.

Note: we are using the actual physical pin numbers on connector P1 as they are easier to locate.