Code:
/* FreqMeasure - Example with serial output
* http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
*
* This example code is in the public domain.
*/
#include <FreqMeasure.h>
void setup() {
Serial.begin(57600);
FreqMeasure.begin();
}
double sum=0;
int count=0;
void loop() {
if (FreqMeasure.available()) {
// average several reading together
sum = sum + FreqMeasure.read();
count = count + 1;
if (count > 30) {
float frequency = FreqMeasure.countToFrequency(sum / count);
Serial.println(frequency * 60);
sum = 0;
count = 0;
}
}
}
Im just wanna have the RPM also on Zero with this sketch it doesnt work
Im just beginner and read also the tread with freqmeasure with zero but im stucked here .Too much input!!!
Im sure anybody oder Paul Stoffregen can help me with an working example!
Im need this to finish my project OMG!!
Thanks in Advance
PS: The Code im found in a tread here https://forum.pjrc.com/threads/27482-zero-handling-in-FreqMeasure
is just crap and dont working
Last edited: