Hello all,
I currently have a project with a user interface that consists of an LCD screen and a small number of momentary pushbuttons. Users interact with the buttons to control the behavior of the device.
The buttons are a bit awkward, which has me thinking about replacing them with a pushbutton rotary encoder. The user would scroll through menus by turning the encoder, click it to choose a setting, then spin the encoder to increment or decrement the value. I can picture this having a sort of ipod-like simplicity and I really like it.
However, I don't have a bunch of free pins sitting around. The pushbuttons are working on an analog input pin with a series of resistors acting as voltage dividers such that I can detect which button was pushed and act accordingly. Has anyone ever done this approach with a rotary encoder? Does it strike anyone as being within the realm of possibility?
I've seen the rotary encoder page on the playground:
http://arduino.cc/playground/Main/RotaryEncodersbut after a quick scan it looks like all of those examples require multiple pins (worst case, interrupt pins). I don't care a ton about accuracy or speed. I have no experience with rotary encoders so I plan on experimenting a bit with this, but I figured I'd throw the question out to see if someone else had already solved this. Looking at the graph of "a" and "b" waveforms in the first example in the playground, it strikes me that you could put the two on one pin with a resistor divider, and then just work out the maths to determine which transitions indicated which state(s) for the encoder.