If yours reads from the flywheel which most do then it can be buildup of rust particles on the sensor end. Find it at the flywheel, remove it and clean the surface.
Reinstall turning it in untill it touches the flywheel , then back it out about 1/4 to 1/2 turn and set the lock nut.
The flywheel teeth create a magnetic pulse as they pass the sensor and rust will interfere with that pulse generation being read by the sensor.
Of course be sure the wiring is clean and tight.