2010
01.13

Image Courtesy of TrevorShp.com

By Jeff Kohrman

Not to turn into an Etch-a-Sketch blog, but this one’s pretty neat, and it’s a great way to show off what your Arduino can do with minimal effort.  Trevor, of Trevorshp.com, has created his very own digital version of an Etch-a-Sketch.  He’s even been kind enough to post the code for both the Arduino IDE and Processing.  Here’s what you’ll need.

  • An Arduino
  • Two potentiometers

That’s seriously all that’s needed.  Just plug the positive leads of the potentiometers into +5V, the negative leads into Ground, and the center leads into Analog 0 and 1.  These will act as your Etch-a-Sketch knobs to move the stylus.  The hard work is done in the programming.

Here’s what’s actually going on.  The Arduino is programmed to constantly read and print to the serial port the analog values of Analog pins 0 and 1, calling them xCoord and yCoord.  Processing then looks at the serial port and translates those integers into coordinates for the Etch-a-Sketch stylus, so that when you turn the potentiometers, the stylus moves accordingly.  The only real change that you’ll need to do is set your COM port in the Processing code to the one being used by your Arduino.

You can grab the code for your Arduino here, and the Processing code here.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Technorati
  • Twitter

No Comment.

Add Your Comment