Thermal printers are cool… or, uh, warm actually. They use heat to make images, so they never need ink and they print on receipt rolls. The thermal printer available from Adafruit is a particularly tasty example, as it comes fully documented for the budding hacker. [Ed] is one such person, who set about writing his own driver to use the hardware with Linux on a Raspberry Pi.
The project came about as [Ed] didn’t like the halftone output from the standard Adafruit CUPS driver. Thus, a dithering-capable driver was needed instead. The first step of the project was to get dithering working via running such an algorithm into a custom driver, as well as to vary the heating time of the print head to gain greyscale capability. From there, the driver was integrated with CUPS and could be used with the Linux lp command. Finally, measures to deal with the paper running out were coded in as well.
It’s a fun dive into the nitty-gritty of talking to printers at the low level, something that few of us think about when printing concert tickets in a rush. There’s a lot that goes on to get a page to print successfully, and [Ed]’s work leaves us more respect for everything that goes on to get an image on the paper. The driver is available for keen tinkerers over at Github.
Meanwhile, consider a thermal printer for all your banner-printing needs.
…a proper Micropython driver for this printer would be really cool
I mean, the link to the git is right there for the one c++ file you need to implement a driver in μpython. It’s not like he’s calling some special proprietary library and at the very least, you could turn this driver into a linked library and strip out all the cups stuff. What are you waiting for? Get started!
Brilliant! Improving hardware with software is by far my favorite type of hack!
Pink Noise dither was created in the 1980s. Needs pink noise dither.
Maybe it was blue noise that is optimal. The algorithms are derived here https://www.amazon.com/Digital-Halftoning-Robert-Ulichney/dp/0262210096
Looks like it could be applied to laser engravers as well.