October 13, 2005
Etch a Sketch (analog -> serial -> computer)
The assignment for this week was to replace the mouse.
Using two potentiometers to control X and Y movement, and a switch to act as the mouse's button, I was able to create my own mouse replacement. I connected it to Processing and was able to make a digital etch-a-sketch.
The picture below shows the controller. I just glued the X pot and the Y pot to a piece of wood to anchor them (otherwise you need to use two hands to control each pot: one to hold it steady, the other to twist the knob).
I made sure to connect the positive and ground terminals of the pot in the same order for each so that they would both increase resistance in the same direction. If I had wired them the other way, twisting left would decrease resistance on one pot but increase it on the other. If I had made this mistake I could have fixed it in the computer (changed one of the variables to be = MAXVALUE - value, for instance), but it's easier this way.
The switch is just a piece of cardboard with a wire in it that you press onto another bare wire that is wrapped around the wood. I had the etch-a-sketch in mind when I built this controller, and so the switch has a bit of a gummy feeling. I remember when I used to play with etch-a-sketches that erasing the image was always a little difficult. You had to shake it a lot, and sometimes your "etching" would only have faded instead of disappeared. So by making the switch a little clunky I kind of replicated the same clunky erase feeling.
I also attempted to replicate the unstable erasure via software. In my Processing applet, I made it so that the erase button only dims the onscreen etching. One needs to press it several times to get the image to disappear completely. See screenshot below:
Code
PicBasic ProProcessing (Java) Code
Posted October 13, 2005 03:37 PM. Categories: Week 5 | Permalink