Yfs201 Proteus Library Jun 2026
void setup() Serial.begin(9600); pinMode(2, INPUT); attachInterrupt(digitalPinToInterrupt(2), pulseCounter, RISING); lastTime = millis();
When water flows through the sensor, the rotor spins. The Hall Effect sensor detects each rotation and generates a pulse, with the pulse frequency directly proportional to the water flow rate. Each pulse represents a fixed volume of water, allowing the system to calculate both instantaneous flow rate and cumulative volume. yfs201 proteus library