Week 11

Reflection

Well input devices are certainly fun to play with but can be frustrating when it behave unexpectedly. I always wanted to work with rotary encoder because I think they are very versatile. With just a single rotating shaft and a single button, I say it could covers 90% of user interaction use cases. Let's compare with some alternatives.

Touch input of course will be much nicer, but the component will be exponentially more expensive. If the component isn't a good quality one, the interaction will suffer greatly if you experience issues latency or ghost clicking.

Well you will want multiple buttons if you want to type on your device, but if you are already on that stage, you might as well hook up a keyboard to your device. If you need only smaller set of buttons (like arrow keys), that can easily be replaced by just a single rotary encoder and I would argue it has better user experience.

Things I Learned

Initially I thought connecting this component will be as simple as connecting a button. Even for a button, before Fab Academy I did not realize there could be a fundamental issue such as floating voltage that need to be rectified using a pull up resistor as I discussed on my embedded programming assignment. As for the issue with rotary encoder, facing this bouncing issue pushed me to really understand the mechanism of the physical component itself. What signal are they generating, how said signal should be interpreted as physical rotation and direction, and why the issue still persists even though the code should work in theory.

Probing the CLK and DT pin using an oscilloscope when we do our group assignment helps me to answer those questions. Seeing how the signal pulses high and low sequentially really cemented the concept of bits for me. Essentially they are sending sequence of both 1 1 or 0 0 with slight delay in between one pin to another, just like talking in morse code. This reminds me of a documentary I watched about the first effort to create a programable digital computer and how binary number became the basis of it because of that's the only way to store state in a vacuum tube, on or off, 0 or 1, LOW or HIGH, 0 V or 5 V.

Alt text
Rotary encoder digital signals
Alt text
Potentiometer analog signal

We also probe analog signal of a potentiometer and a light sensor in our group assignment. I understand the difference between analog and digital signal in concept, but seeing it with our own eyes and how the signal changes based on our interaction do elevate my understanding of it. Interestingly the difference between them reminds me of the difference between staggered and smooth keyframe animation interpolation. Reminds me of the days where I worked as a motion graphic animator in my early career stage.