SparkFun Electronics will be closed in observance of memorial day on Monday, May 29th. We will resume normal business hours on Tuesday, May 30th. Any orders placed after 2pm Mountain Time on Friday, May 26th will process and ship out on Tuesday, May 30th.


Member Since: September 8, 2012

Country: United States

  • I figured out a way to use this (or any other quadrature/2-bit Gray code encoder) with an Arduino (or other controller). No interrupts, and no switch bounce issues. Just take an old PS/2 ball mouse (NOT optical), open it up, and replace the phototransistor from the optical encoder wheel with three wires going to the A-B-C terminals. You can also replace the left/right mouse button with the switch on this encoder. For some example code, go to http://playground.arduino.cc/ComponentLib/Ps2mouse for a description and library of how to hook up a PS/2 mouse to your Arduino. The mouse controller IC takes care of debouncing, direction sensing, and counting steps between queries. It will also allow you to hook up two encoders (three if the mouse has a scroll wheel) simultaneously.

No public wish lists :(