control pomp with flow meter

Hi
I want to control a pomp with flow meter
i want to turn on pomp every 5 min and check the flow meter value while value of flow meter > 0 pomp work and when the value = 0 turn the pomp off.
my problem is when i turn pom on after a few second flow meter rotate ( because of pipe line ) and pomp turn off .
i need to check the value of pomp a few second after turning the pomp on
please help me

sketch_may08a.ino (2.22 KB)