Before you do that, you haven't answered my question. Do you have access to a variable frequency, variable mark-to-space ratio square wave generator? Do you have access to an oscilloscope?
I can tell from your latest post that you don't know for sure why it isn't working, and why it's crashing. Fundamentally, you don't know whether the problem is with your code, or with the incoming signals, or with electrically induced noise.
You need to do these things:
1/ Using your signal generator, test it extensively on your workbench across the full range of frequencies it is expected to handle. Ditto with the M/S ratios. If it crashes on your bench, debug it and fix it. If the readings are wrong, or update too slowly, or anything else that you don't like, debug it and fix it. Continue until it is working perfectly and you are completely confident in your code.
ONLY THEN:
2/ Put your oscilloscope in your car, get someone to drive it while you look closely at the trace. Check for spikes, jitter, noise, etc. Measure peak voltages, measure timings and ratios. Work out what you must do to tame any spikes and condition the signal so it's suitable to be connected to your Arduino.
3/ Build and test the signal conditioning circuitry (if, indeed, any is necessary).
4/ Then install your Arduino in the car. If it crashes, you know for sure it isn't the code, but rather some kind of problem arising from the electrically noisy environment.
The most important thing is to get a 'scope and a sig gen, and get it working on your bench first. Until you do that, you are working blind.