Tutorial: Reading Water Flow rate with Water Flow Sensor

I believe I have found a mistake in the code!!



It says



Calc = (NbTopsFan * 60 / 7.5); to give the litres per minute.



This line is incorrect as NbTopsFan gives the amount of pulses in the one minute time.

60 is the amount of seconds in a minute

and 7.5 is the litre converter



so at the moment, using units only, the result is min/L



so just change it around to get an appropriate result

Calc = (NbTopsFan * 7.5 / 60) // this will result in pulses(litres)/minute

hey presto all you people wondering why your code didn’t work :slight_smile: