Purely Functional Selfies: Thermal Printer Speaks Haskell

[Dan] recently got a cheap POS thermal printer to chooch remotely over ESP32. Having conquered that project, he decided to see what else he could get the printer to do. Why not use it to print pictures? Sure, it’s been done, but not with Haskell. And yeah, the pictures will be grainy and weird-ish and limited to black and white, but hey, we love black and white around here as much as the idea of doing something simply because you can.

In the first project, [Dan] had to figure out how to talk to the printer since the RS422 cable it came with didn’t seem to work. He bought a TTL-to-RS485 adapter, but then realized he could use TTL directly and wired up a ESP32/OLED dev board to it. During the course of turning it into a photo booth, he had to switch to a bigger screen with a better refresh rate.

Unfortunately, [Dan] was unable to use Haskell by itself. He blames this on the cobwebs in the Haskell ecosystem, something that isn’t a problem for languages like Python that celebrate wide usage and support. [Dan] wrote a Python script that handles image capturing, display, and listening for touch activity on the screen, but Haskell ultimately controls the printer. Check out [Dan]’s demo after the break.

This project may have been trying at times, but at least [Dan] didn’t have to give it a brain transplant to get it to do what he wanted.

Continue reading “Purely Functional Selfies: Thermal Printer Speaks Haskell”

ImplicitCAD: Programmatic CAD Built With 3D Printing In Mind

Cornerstone of many useful things: This Prusa i3 part was modeled in OpenSCAD.

Programmatic CAD, in particular the OpenSCAD language and IDE, has accompanied the maker movement for a while now. After its introduction in 2009, it quickly found its way into the 3D printing toolbox of many makers and eventually became what could be called an Industry Standard among open hardware labs, makerspaces and tinkerers. The Prusa i3, one of the most popular DIY 3D printers, was designed in OpenSCAD, and even Makerbot, the company that sold 100.000 3D printers, uses the language for its “Customizer” – an online tool that allows users to customize 3D printable models with minimal effort.

OpenSCAD is indeed a wonderful tool, and we have been using it a lot. We have become used to its quirks and accepted working with polygon mesh approximations of the models we are trying to design. We have made our peace with excessive rendering times, scripting workarounds and the pain of creating fillets, and we have learned to keep our aesthetic expectations low. We are happy with the fact that there is a way to programmatically create and share virtually any object, but sometimes we wish there was a better way in the open source world. Hint: there is.

Continue reading “ImplicitCAD: Programmatic CAD Built With 3D Printing In Mind”

SpacewΛr Comes To Life From Bonus Formlabs Printer Parts

What might you do with a few extra stereolithographic 3D printer parts? Why not make a galvo display and resurrect a couple of classic vector graphic games of yore? That’s exactly what [Matt] did. With a few extra Formlabs components and a Haskell implementation of Spacewar, [Matt] can kick back and blast his extraterrestrial foes on the surface of his Formlabs cover.

[Matt’s] source code drives the Form 2 controller board to output laser graphics on the surface of a Form 1 case. These parts might be a commodity for this Formlabs Engineer, but the output is nothing short of spectacular, given the game and USB drivers were put together from scratch. In case you want to give the Haskell source code a try, [Matt’s] kindly included an alternative software-only display using OpenGL.

Unless you’ve just upgraded from Form 1 to Form 2, odds are pretty low that you can pull this one off without breaking either your printer or your wallet. Fortunately, [Alvaro] has paved the way with a stellar galvanometer display that began as a few parts from eBay. At last! Once our Formlab printer warranties expire, we’ll know where to start looking for parts for that mosquito killer we needed.

Continue reading “SpacewΛr Comes To Life From Bonus Formlabs Printer Parts”