Thread: Magnetic Sensor
View Single Post
  #21   Spotlight this post!  
Unread 28-02-2013, 18:30
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 495
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Magnetic Sensor

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
Reply With Quote