I am fairly new to the arduino world i have some very basic skills and understanding of how it all works. basically i am creating a fluid dispatch system for a food preservative. this is for a school project. my idea is to use the arduino as the controller and have it read and count pulses that will keep track of how much fluid has been pumped. i want to be able to push start and the system pumps until a value is met.
what i am having trouble with is how would i write code for the flow meter? would it be some sort of count++ code that has a value of say 1000 pulses and once it is met it resets to 0 and writes the pump motor pin low? please help me as i am in the dark on this.