# Find volume from a flow rate?

i want to code to find the volume from a flow rate, the following is my code
and this is the sensor datasheet
i find that having user blow constant rate for X amount of time should be easiest path? but least reasonable
any ideas?

int MSB,LSB,total;

void setup()
{
Wire.begin();
Serial.begin(9600);
delay(100);

Wire.beginTransmission(0x07);
Wire.write(0);
Wire.endTransmission();

}

void loop() {

Wire.requestFrom(0x07,2);
if(Wire.available()<=2) {
}
total = (MSB<<8)+LSB;
total = total/10;
Serial.print(total);
Serial.println(" CC/m");

}

A flow rate is likely something like N liter per seconds or N liter per tick so it’s a simple math based on the duration of the measure or the number of ticks

sergy3:
i want to code to find the volume from a flow rate

A lot depends on the unit of measurement in which the flow rate is reported. As @JML has said if it is reported in litres per minute you have the answer directly.

But if it is reported in metres per second then you also need to know the cross-sectional area of the flow.

...R

Serial.println(" CC/m");

is that "cubic centimetre/minute"?