To compute RPM you can then use millis() (or similar) to define a particular time interval, then see how much Timer 1 has changed during that time interval. That can easily be converted to RPM.
That does sound quite elegant, can it be done in the Arduino IDE, or would I have to program that in assembly?
Here is my rpm calc code:
// Sensor Reading-------------------------------------------------------------------------------------
if (gearCount >= 15) {
gearRpm = gearCount*25000000L/(micros() - gearTimeold);
gearTimeold = micros();
gearCount = 0;
}
if (tachCount >= 15) {
tachRpm = tachCount*60000000L/(micros() - tachTimeold);
tachTimeold = micros();
tachCount = 0;
}
//--------------------------------------------------------------------------------------
Here are my ISR's
void gear_fun()
{
gearCount++;
//Each rotation, this interrupt function is run twice
}
void tach_fun()
{
tachCount++;
//Each rotation, this interrupt function is run twice
}
And this is my RPM output (although rpm's are *10- i messed up calculations):

As you can see it is quite noisey, and the acceleration data could be smoother.