Arduino Pro Mini


For my next project (gas/water/elec meter pulse counting), I want to use the Arduino Pro Mini, primarily because of it's size. As far as I understand it, this unit, like the Duemillanove, has two hardware interrupts. I'm trying to think of a suitable way to have the Arduino 'count' the optical pulses from each meter, other than by using the interrupts - as I need a solution with three, not two!

Given that each of the three pulses could occur simultaneously, I need a way to be able to count the pulses from each of the three pins (swap state from Low to High) as they happen.

Any suggestions/advice?

Many thanks,


You can use the input change interrupt so you are not limited to just two. I used this in my project:-

However I think you don't need interrupts here. Although pulses can happen simultaneously they have a finite pulse width so it is an easy thing to catch both going off in a normal loop. The processor is so fast the problem you have is only counting it once instead of several times. Have a go at some of the tutorials in the playground and the learning section to gain a bit of familiarity with this board and what it can do. I know there are a few members of this forum doing this sort of thing. Good luck.

Thanks Mike for the video there, just loved the construction details... well done great job on that.



Hi Mike

Thanks for the information - I'll have a look at your code and see what I can figure out :)