My application is counting water usage from my tank. I would like to use a water flow sensor. The output is a pulse and the more pulses, the higher the flow rate. e.g.
but the water flow is highly intermittent, could last for 30s and I read here that pulse counting is blocking. https://developer.electricimp.com/api/hardware/pin/read
This is very strange. I just want a counter that is on all the time so I can read the counter and calculate total water flow since the imp turned on. Why is pulse counting blocking in electric imp? It’s as if the counting is done in software instead of with a hardware counter. Should I just buy a hardware counter instead of potentially blocking the CPU for 30 seconds while I wait for the water to stop flowing?
EDIT: I should also mention that this CPU blocking pulse count call is annoying because I planned to have four tanks connected to my imp at once and if two flow at once then only one will be counted.