I think you've got the general idea, but the execution isn't the best.
Check the COUNT command and let it count for a second, divide by how many slots are in the wheel, then multiply the result by 60. That should give you RPM. You won't get the best resolution, but the idea should trigger some better ideas for you.
Bookmarks