Go Down

Topic: Frequency Counter Library (Read 44 times) previous topic - next topic

pito


BrainBooster

hi,
do you think it's possible to modify the lib in order to be able to read also the duty cycle?
we could use two interrupts , one for the rising edge and one for the fallig so at the end of the measure we could count both events and then do the proper calculations?

retrolefty


Hi all,
I'd like to ask the question why it is necessary to disable Timer0 before starting the counting process?

- Michael


Most likely because the free running timer0 interrupts used by the arduino start-up code to support the delay() and millis() and micros() function would add a element of variable latency to responding to the timer interrupt used by the frequency counter function.

AaronTroeger

Hi, I'm trying to use Arduino Uno with 2 flow sensors.
They pulse at 3300 per litre. I have them hooked up to pins 4 and 5 on my arduino.
My question is can I use FreqCounter to read each one separately and over a 1 second period?
I have looked through the code and I can't see anywhere to allocate the pins I want it to read..

AaronTroeger

Quote
Hi, I'm trying to use Arduino Uno with 2 flow sensors.
They pulse at 3300 per litre. I have them hooked up to pins 4 and 5 on my arduino.
My question is can I use FreqCounter to read each one separately and over a 1 second period?
I have looked through the code and I can't see anywhere to allocate the pins I want it to read..


I've had a quite look through the C++ coding. If I change every occurance of T1 with the relevant T number for pin4 or 6?
If anyone knows where i can find those T numbers that would be awesome :)

Go Up