Hello guys,
I have a motor with magnetic encoder (shown in the Pic below). When the motor (and the magnet connected to it) turn, the two-pin sensor (located next to the magnet) gives many pulses per revolution. I can have these pulses if I wire up one of the two pins of the sensor to ground.
What I need is to use those pulses to determine how many revolutions the motor should make before it stops.
I have bought many Arduino Duemilanove, mainly for this purpose, but I have been stuck.
Could anyone help me on this? Any simple code that I can use for this would be helpful.
Your help would be appreciated!
Thank you,