Water flow sensor
Get flow rate and volume consumption from water flow sensors
Features
- 🔌 Initialize sensor on GPIO pin
- 🚛 Set the sensor model
- 🚿 Flow detection
- 💧 Get flow rate (L/m)
- 🍼 Get volume consumption (L)
Install
$ cd <project-folder>$ npm install water-flow-sensor --save
Usage
- Require
water-flow-sensor
module - Initialize sensor with
pin
andmodel
values and acallback
- The callback gives (when flow start/stop)
res.pin
: sensor pinres.model
: sensor modelres.isRunning
: whether the sensor is running or notres.flow
: instant flow rate in L/minres.volume
: volume in L
- Get status, as well as flow and volume data anytime
// Initialize the sensorvar wfs = sensor = 17 'POW110D3B' wfsCb // Callback { console} // Access to status and dataconsoleconsoleconsole
Contributing
Please read the Code of Conduct.
Technical details
Water flow sensor models
Platforms
Developed on Rapsberry Pi model B
Dependencies
onoff ^1.1.2