Go to the source code of this file.
◆ wfs_init()
Initialize a WFS device
- Parameters
-
pin | GPIO pin to use. This must be an interrupt capable pin. |
- Returns
- Device context, or NULL on error
◆ wfs_close()
WFS close function
- Parameters
-
◆ wfs_get_millis()
Returns the number of milliseconds elapsed since wfs_init_clock() was last called.
- Parameters
-
- Returns
- Elapsed milliseconds
◆ wfs_init_clock()
Resets the clock
- Parameters
-
◆ wfs_clear_flow_counter()
Resets the flow counter to 0. The flow counter should be stopped via stopFlowCounter() prior to calling this function.
- Parameters
-
◆ wfs_start_flow_counter()
upm_result_t wfs_start_flow_counter |
( |
const wfs_context |
dev | ) |
|
Starts the flow counter
- Parameters
-
- Returns
- UPM result
◆ wfs_stop_flow_counter()
Stops the flow counter
- Parameters
-
◆ wfs_flow_counter()
Gets the flow counter
- Parameters
-
- Returns
- Flow counter
◆ wfs_flow_rate()
Computes the flow rate in liters per minute (LPM). Note, this is for the Grove WFS. If you are using some other WFS, you should compute the flow rate on your own based on the data for your sensor.
- Parameters
-
- Returns
- Computed flow rate in liters per minute
◆ wfs_context