Vehicle speed sensor

dexterbug:
OK so I uploaded the sketch to my arduino nano and it didnt work.

I got out my multimeter and measured the VSS going into PIN D5 at 40mph and its actually 60hz. So my information about 8000 pulses per mile must be incorrect.

Any way I carried on driving but didnt get any output from Pin A0 at any speed.

:confused:

Time to adjust the fortyMPH value?

It would be easier to debug if the Nano could display some runtime info.

Even blinking a led could help, like making 1 blink every 800 pulses (should be 1/10th mile) or so. See how far it's off and calibrate the values.

Perhaps also in setup(), add a line: pinMode( pulsePin, INPUT );
IIRC it shouldn't be needed, all pins are INPUT and LOW at start by default.

Has anyone checked my math?