Hi! I've borrowed sketch from another project which can count the pulses generated by hall sensor. For experiments I have DC motor with magnet on it and Arduino Pro Mini plus LCD display. When motor is turning pulses are counted. If I change the polarity of the motor power it starts to turn opposite direction, but pulses on the display continue to increase. How that could be possible to tell arduino that if polarity of the power of the motor changed than pulsed should be extracted? I hope it is understandable what I am trying to explain.