Can I use attachInterrupt for this?

Hello everyone,

I am currently working on a controller for my beer brewing machine and I want to extend its function.

I want to be able to enter a water amount and a pump will then start to pump water into a pot until the specified amount is reached.

For this I will be using a flowmeter which produces about 88 impulses per Liter. The Arduino has to read these impulses very fast but also be able to send a string with process data via a Bluetooth serial connection once every second.

Let´s assume I use attachInterrupt for this and the pump is turned on for about 10 minutes. The Arduino will constantly be jumping to the ISR for these 10 minutes. Will the Arduino still able to send the Bluetooth data once every second? If not, which alternative could I revert to?

I am still waiting on the flowmeter so I can not test this, but it would be great to gather some information beforehand.

Thanks in advance!
Mike

Will the Arduino still able to send the Bluetooth data once every second? If not, which alternative could I revert to?

It takes next to no time to invoke an interrupt service routine. It takes next to no time to return from the ISR. IF your ISR does what it should (simply increment a counter), then the ISR will not interfere with sending data to the serial port buffer. Interrupts happen to actually shift the data out, and you haven't noticed them interfering with your code, have you?

Bavilo:
I am still waiting on the flowmeter so I can not test this, but it would be great to gather some information beforehand.

You can test such things by creating a pulse on an output pin and connecting it back to the input pin that you are reading.

Thanks for the help guys! I guess this will be the way to go then.