Thanks to visit codestin.com
Credit goes to github.com

Skip to content
 
 

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Water Flow Sensor Library Arduino

arduino-library-badge PlatformIO Registry GitHub release GitHub

Description

Arduino library for Flow Sensor, YF-S201

Volume Formula

$$Volume (L) = {Total Pulse \over Pulse1Liter}$$

Flowrate Formula

$$Q = {Frequency \over Pulse1Liter}60$$ $$Q = {Pulse/Time \over Pulse1Liter}60$$

Q = Flowrate (Liter/minute)

Sensor

Sensor Type Code
YF-S201 YFS201
YF-B1 YFB1
OF10ZAT OF10ZAT
OF10ZZT OF10ZZT
OF05ZAT OF05ZAT
OF05ZZT OF05ZZT

Usages

See all examples

initialization

#include <FlowSensor_Arduino.h>

uint8_t type = YFS201; // type : Sensor type
uint8_t pin = D2; // pin : interrupt pin

FlowSensor_Arduino Sensor(type, pin);

Sensor begin

param userFunc

void begin(void (*userFunc)(void))

Sensor Read

param calibration

void read(int calibration)

Count Pulse

void count()

Get Total Pulse

return total pulse

unsigned long getPulse()

Get Flowrate (L/s)

return Flowrate (L/s)

float getFlowRate_s()

Get Flowrate (L/m)

return Flowrate (L/m)

float getFlowRate_m() 

Get Total Volume (L)

return Volume (L)

float getVolume()

About

Water Flow Sensor Arduino Library, Flow Rate, Volume, YF-S201

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages