|
upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the Grove Water Flow Sensor. More...
However, be careful when wiring this up - the schematic appears to have a bug in it: the lower left connection of the signal line (yellow) to Vcc (red) should not be there. The sensor can work with this connection, but probably not for very long.
Public Member Functions | |
| synchronized void | delete () |
| GroveWFS (int pin) | |
| long | getMillis () |
| void | initClock () |
| void | clearFlowCounter () |
| void | startFlowCounter () |
| void | stopFlowCounter () |
| long | flowCounter () |
| float | flowRate () |
| GroveWFS | ( | int | pin | ) |
Grove Water Flow sensor constructor
| pin | Digital pin to use |
| void clearFlowCounter | ( | ) |
Resets the flow counter to 0. The flow counter should be stopped via stopFlowCounter() prior to calling this function.
| long flowCounter | ( | ) |
Gets the flow counter
| float flowRate | ( | ) |
Computes the flow rate in liters per minute (LPM)
| long getMillis | ( | ) |
Returns the number of milliseconds elapsed since initClock() was last called.
| void initClock | ( | ) |
Resets the clock
| void startFlowCounter | ( | ) |
Starts the flow counter
| void stopFlowCounter | ( | ) |
Stops the flow counter
1.8.9.1