Dispense signal after an interval with external interrupt and average

I am using the senserion flow meter qt500 to view the analog signal for an dispense monitoring. I convert the analog signal to voltage.

The dispense dose is continuously flowing after an interval based on process. The signal is linear proportion to flow rate. I want to collect the dispense signal whenever the process ask with an external Interrupt. Then, want to serial plot the average of the analog signal. Plan to get dispense volume later i.e dispense rate/time.

Need an code help to collect data when the dispense happen and the average. Thanks in advance.

You should post in"Gigs and Collaborations" and bring your wallet.