Pulse counter
Posted: Fri Mar 09, 2018 1:53 pm
Hi guys
I have downloaded the interrupt counter example from the Matrix website and am trying to fathom out how to be able to adapt this program to use on an anemometer? I merely would like to know at a certain wind speed what the number of revolutions the rotor head is making which I can compare with a calibrated anemometer.
I am using a reed switch in the anemometer housing with a small magnet in the revolving head.
Because I have never worked with interrupts before, I am not sure how to adapt the program so as to show the current number of pulses emanating from the rotor. The program simply counts the number of interrupts perfectly as it should and stores them as a total, but how does one read the pulses from the rotor to show the current number of revolutions using the interrupt method??
This is baffling me to no end.
Any help would be appreciated, thank you.
I am including the Matrix example program.
Regards
Ted
I have downloaded the interrupt counter example from the Matrix website and am trying to fathom out how to be able to adapt this program to use on an anemometer? I merely would like to know at a certain wind speed what the number of revolutions the rotor head is making which I can compare with a calibrated anemometer.
I am using a reed switch in the anemometer housing with a small magnet in the revolving head.
Because I have never worked with interrupts before, I am not sure how to adapt the program so as to show the current number of pulses emanating from the rotor. The program simply counts the number of interrupts perfectly as it should and stores them as a total, but how does one read the pulses from the rotor to show the current number of revolutions using the interrupt method??
This is baffling me to no end.
Any help would be appreciated, thank you.
I am including the Matrix example program.
Regards
Ted