Homework Robot - Handwriting CNC
Overview
Before the 3018 kit became a mill, I glued a mechanical pencil to its spindle holder and made it write my homework in my own handwriting. The hardware took an afternoon. The software took hours: a small HTML canvas page in Chrome that let me draw each letter and printed its coordinates to the console, a data.json of stroke points per character, and a Node.js script that asks for the text, the letter height in millimeters and the line length, scales the points, wraps the lines and writes one G01 move per point into a G-code file. Then the machine writes whatever you type.
Photo gallery
What I learned
- The hardware hack was the easy part. I thought the pencil mount was the project. It was glue. Capturing my handwriting as point data and getting the scaling and line wrap right was almost the whole job.
- Build the tool that makes the data. I didn't plan the canvas app; I wrote it when I realized I had no way to turn handwriting into coordinates. It's a few dozen lines and it's the thing that made the project possible.
- Readable beat optimized. The G-code generator is one loop and a couple of magic numbers (275 units per character, divided by the size in millimeters), and I left it that way on purpose so someone else could read it. For a one-weekend project that was the right call.