Thermal printer with a loop of thermochromic foil inserted in it, printing digits of Pi on the loop.The digits gradually disappear from the foil as it exits the printer.

Celebrating The Infinity Of Pi Day With Thermochromic Foil

It might take you some time to understand what’s happening in the video that Hackaday alum [Moritz Sivers] shared with us. This is [Moritz]’s contribution for this year’s Pi Day – a machine that shows digits of Pi in a (technically, not quite) infinite loop, and shows us a neat trick we wouldn’t have thought of.

The two main elements of this machine are a looped piece of thermochromic foil and a thermal printer. As digits are marked on the foil by the printer’s heating element, they’re visible for a few seconds until the foil disappears from the view, only to be eventually looped back and thermally embossed anew. The “Pi digits calculation” part is offloaded to Google’s pi.delivery service, a π-as-a-Service endpoint that will stream up to 50 trillion first digits of Pi in case you ever need them – an ESP8266 dutifully fetches the digits and sends them off to the thermal printer.

This machine could print the digits until something breaks or the trillions of digits available run out, and is an appropriate tribute to the infinite nature of Pi, a number we all have no choice but to fundamentally respect. A few days ago, we’ve shown a similar Pi Day tribute, albeit a more self-sufficient one – an Arduino calculating and printing digits of Pi on a character display! We could’ve been celebrating this day for millennia, if Archimedes could just count a little better.

Continue reading “Celebrating The Infinity Of Pi Day With Thermochromic Foil”

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”

Towards More Interesting Instant Cameras

When [Ch00f] was getting jeans rung up at Nordstroms, he noticed how fast thermal receipt printers can put an image on a piece of paper. This observation isn’t unique to the circles [Ch00f] frequents – there are a few small receipt paper printers out there that connect to the Internet, iPhones, and a whole bunch of other Kickstarter-friendly keyword devices.

Nevertheless, a device that can make a hard copy of an image quickly and cheaply isn’t something you just stop thinking about. After rolling the concept around in his head for a few years, [Ch00f] finally came up with the perfect build – a camera.

The hardware for the build is based around an STM32F4 Discovery board. It’s a bit overpowered for this sort of application, and this is one of [Ch00f]’s first adventures in ARM-land. The rest of the hardware consists of a thermal receipt printer and a JPEG camera, the latter of which replaced a cellphone CMOS camera module that was lost in a move.

A custom camera requires a custom enclosure, and for this [Ch00f] made something remarkable. The entire enclosure is CNC milled out of a beautiful piece of figured walnut. The end result looks far too good for a prototype, but it does polish up nicely with a bit of linseed oil.

Now [Ch00f] has an instant camera that takes the idea of a Polaroid and turns it into something that produces a print for tenths of a cent. There’s a time-lapse function – just a zip tie on the shutter button – filters with the help of highlighters, and the ability to record movies in flipbook format.

It’s a great project, and also something that will make for a great crowdfunding campaign. [Ch00f] has already started work on this. He already has a sleek, modern-looking website that requires far too much scrolling than should be necessary – the first step to a winning Kickstarter. [Ch00f] also learned a lot about ARMs, DMA, dithering, gamma correction, and the JPEG format, but that’s not going to get anyone to open up their wallet. You know what will? A slick video. You’ll find that below.

Continue reading “Towards More Interesting Instant Cameras”