Hello, I'm working with a motorbike speedometer and it works with hall effect sensor and a magnet in the front wheel. The meter measures time it takes between signals and gives a speed from 0 to 200 km/h.
I'm trying to use this in thing in my sim rig and I have arduino hooked up the signal output. I can generate a signal easily with delay and digitalwrite commands. For example if I make signal with 900ms delay, I get speed of 2km/h. If I take 450ms delay, i get 4km/h in the meter.
My problem is finding the formula that allows arduino to convert speed input from the game to the delay it need to have between signals.
For example, if I have speed of 100km/h whats the delay that I need to use to give me accurate reading on the meter? I tested that its 22ms but how do I get the arduino to calculate that for me?