1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/PiSrf
JsBergbau 245109940c
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 08:32:55 +01:00
..
LICENSE Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
nrsrf PiSrf: Added decimal places option + stop bugfix + more keywords (#816) 2021-07-08 08:32:55 +01:00
nrsrf.py PiSrf: Added decimal places option + stop bugfix + more keywords (#816) 2021-07-08 08:32:55 +01:00
package.json PiSrf: Added decimal places option + stop bugfix + more keywords (#816) 2021-07-08 08:32:55 +01:00
pisrf.html PiSrf: Added decimal places option + stop bugfix + more keywords (#816) 2021-07-08 08:32:55 +01:00
pisrf.js PiSrf: Added decimal places option + stop bugfix + more keywords (#816) 2021-07-08 08:32:55 +01:00
README.md SRF node - add ability to set time interval 2017-08-14 09:20:18 +01:00

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 your Node-RED user directory - typically ~/.node-red

npm install node-red-node-pisrf

Usage

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

The configuration 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

You can also set the repeat frequency of measurements - default 0.5 seconds.

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

Produces one measure every 0.5s (by default) - 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.