.....Project Diagram..... //....Arduino Code.... /* YF‐ S201 Water Flow Sensor Water Flow Sensor output processed to read in litres/hour Adaptation Courtesy: */ volatile int flow_frequency; // Measures flow sensor pulses // Calculated litres/hour float vol = 0.0 ,l_minute; unsigned char flowsensor = 2 ; // Sensor Input unsigned long currentTime; unsigned long cloopTime; #include <LiquidCrystal.h> LiquidCrystal lcd ( 12 , 11 , 5 , 4 , 3 , 9 ) ; void flow () // Interrupt function { flow_frequency++; } void setup () { pinMode ( flowsensor, INPUT ) ; digitalWrite ( flowsensor, HIGH ) ; // Optional Internal Pull-Up Serial . begin ( 9600 ) ; lcd . begin ( 16 , 2 ) ; attachInterrupt ( digitalPinToInterrupt ( flowsensor ) , flow, RISING ) ; // Setup Interrupt lcd . clear () ; lcd . setCursor ( 0 , 0 ) ; lcd . print ( "Petrol Flow Meter" ) ; lcd . setCursor ( 0 , 1 ) ; lcd . print ( "Harish Projects" ) ;