3 ms·
How the world has changed: "What you’ll need A thermal printer,... Ideally, a Raspberry Pi with Bluetooth,...Node.js 10, Yarn, Python 3.7, Docker...An iPh
by kwhitefoot 5y ago
How the world has changed:
"What you’ll need
A thermal printer,... Ideally, a Raspberry Pi with Bluetooth,...Node.js 10, Yarn, Python 3.7, Docker...An iPhone for the app, "
Nearly forty years ago I implemented a till-roll printer for logging alerts on a UPS. It ran on a 6502 1 MHz SBC with 2 k bytes of RAm and 8 k bytes of EPROM. The 6502 also did all the measurements.
Before anyone complains that my old system did rather less; yes I do understand that, but it still seems to me that both the hardware and software requirements for the Tinyprinter seem rather excessive.
Wouldn't it be possible to just use an ESP32 to do pretty much all of it?
- bencollier49 5y agoPossible, but it would take longer and require more skills. I guess the question is what one's aim is in acquiring a thermal printer. Is it to print thermally? Is it to have a Raspberry Pi project? Or is it to learn a load of electronics, a load of low level code, and the minutiae of how to control a thermal printer at the byte level?
- notjosh 5y agoha, as the author of most of the code on the client side (and thus those beefy requirements), yes it absolutely is possible to use an ESP32! and that’s more along the lines of the original product that inspired this! however, this was built to be more of a glue library - take whatever device you have (Pi, laptop, IoT fridge), and plug in whatever “printer” you have (typically a receipt printer, but friends have used a rooted Kindle, or Instagram API, etc). there’s more to it than that though, as the original protocol is generic (it was built to control all kinds of devices - printers with blob payloads are a nice side effect), so it’s also relatively easy to extend if you want to bolt on other uses cases within the same network. it was never really optimised to be the leanest implementation, but instead easy enough for others to hack on and contribute to. JavaScript/TypeScript on a Pi feels like a reasonable compromise, with heavy emphasis on compromise! so, by focusing more on community and simplicity, it’s fun seeing the weird ways people extend it :)
- goodpoint 5y agoIf I complain about the bloat around docker and node I get downvotes. On HN hype > bloat.
- mattowen_uk 5y agoEach to their own. I think I'd tackle this sort of solution (based on the skills I have) with a Raspberry Pi and a POS receipt printer: Connect Pi to Printer. Have web-server (in lang-of-choice) listening for as POST payloads. spool the payload to a file. print file. Depending on use case, parse the payload to insert required ESC/POS codes (which seem to be a subset of the old Epson Printer ESC codes) for formatting. Tbh... there's probably a way to have Linux present it as a network printer so that other OSs can print directly to the printer.
- jmrm 5y agoAn ESP32 with a 160 MHz CPU and 4 MB of storage? That's totally overkill for a project like this ;-) Jokes aside, probably any microcontroller with Bluetooth or Wi-Fi interfaces could do that kind of job without any problem. Is just processing every data frame you receive an sending them to a serial data interface, that isn't that difficult with the hardware and tools we have nowadays.
- howolduis 5y agoyou basically need a +$1000 worth of hardware for a tiny printer