Chapter 18. Internet-Connected Plotter

While our plotter is connected by USB, we could send the data we want to output through the USB port. Unfortunately, we can’t easily access the USB port from a web browser, so we’d have to make an application in a tool like Node.js.

It would be much better if we could use the Espruino to serve up a web page, and to have that web page handle the rendering, so that’s what we’re going to do!

First, we need to think of how we’re going to draw our images. There are lots of things we could do, but one easy method is to scan from side to side with a sine wave much as we did for the water ripple in Chapter 17, and just to make the amplitiude of the sine wave larger when the image is darker. This will convert the ...

Get Making Things Smart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.