Ahhh thank you for your help. Two more quick question why would i need to change the "periodThreshold in the .h file to something like 1e-3". Also in the .cpp you have
Code:
prevResult = 60.0 / period;
for the proper calculation of the rpm shouldnt it be something like:
Code:
prevResult = ( ((1 / period) / 6) * 60)
or at least thats the function im using to calculate the rpm