Tag Archives: HPGL

EASiLOGO controls your Etch-a-Sketch



Graham Toal has debuted a CNC Etch-a-Sketch robotic platform powered by an Atmel-based Arduino board.

Aside from the board, key project hardware components include:

  • Two stepper motors
  • 
Two bracket sets
  • Two couplers and a 2mm Allen Key
  • 12V power supply
  • One Adafruit Stepper motor shield

On the software side?

“I considered using remote procedure calls, I thought about implementing Hewlett Packard Graphics Language (HPGL) as used in pen plotters, but in the end for fun I decided to use GCODE as my drawing protocol – GCODE is how laser cutters and 3D printers and many other CNC machines are driven, so it seemed like good experience to learn a bit about how it worked,” Toal explained in a recent Instructables post.

“I found an Arduino GCODE interpreter and modified it to suit my project. Mostly the mods were just to remove the Z-axis code that wasn’t needed (you can’t lift or lower the pen in an etch-a-sketch – when you move, it always draws a line) but the main modification was to remove some machine-dependent stepper-motor-driving code and replace it with portable calls to the Adafruit libraries.”

To create a functional LOGO interpreter, Toal turned to Marcio Passos from Brazil who quickly coded an interface (EASiLOGO) based on the “Papert” LOGO interpreter written in Javascript by Thomas Figg along with an Etch-a-Sketch demo from the Mozilla Developer network.

“Marcio and I modified Papert to use the ‘Node.js’ system which gave the code the ability to drive the serial port so that we could send GCODE commands to the Arduino and make the Etch-a-Sketch draw,” he said.

“In a mammoth 30-hr session over the weekend, we got the LOGO interpreter working and sending drawings to the Etch-a-Sketch.”

So, what’s next for Toal? Well, the Maker says he hopes to polish the software so that anyone can use it without needing to build a physical Etch-a-Sketch robot.

“The emulation of the computer-controlled Etch-a-Sketch on our web page is very accurate and we’ll continue to work on it to make it look and perform even better. Programs that run on the web page will run just as nicely on the real hardware,” he added.

“If you can’t build the hardware, you can do the human simulation we described in the introduction, by writing down the instructions on a piece of paper, and giving them to your kids to execute on a real Etch-a-Sketch toy by hand. It’s a great way to learn to program, even without a computer.”

Interested in learning more? You can check out the project’s official Instructables page here.