Arduino library for Flow Sensor, YF-S201
Q = Flowrate (Liter/minute)
| Sensor Type | Code |
|---|---|
| YF-S201 | YFS201 |
| YF-B1 | YFB1 |
| OF10ZAT | OF10ZAT |
| OF10ZZT | OF10ZZT |
| OF05ZAT | OF05ZAT |
| OF05ZZT | OF05ZZT |
See all examples
#include <FlowSensor_Arduino.h>
uint8_t type = YFS201; // type : Sensor type
uint8_t pin = D2; // pin : interrupt pin
FlowSensor_Arduino Sensor(type, pin);param userFunc
void begin(void (*userFunc)(void))param calibration
void read(int calibration)void count()return total pulse
unsigned long getPulse()return Flowrate (L/s)
float getFlowRate_s()return Flowrate (L/m)
float getFlowRate_m() return Volume (L)
float getVolume()