Getting my daily news from a dot matrix printer 2024

· coding · Source ↗

TLDR

  • A Raspberry Pi Zero W runs a PHP cron job at 8am daily, printing weather, stocks, headlines, and Reddit posts on a 1980s Star NP-10 dot matrix printer to replace morning phone scrolling.

Key Takeaways

  • Hardware stack: Star NP-10 (mid-80s, ~$40-60 used) connected via serial-to-USB adapter; printer appears at /dev/usb/lp0 and requires chmod 666 for raw write access.
  • Four free data sources: Open-Meteo (no key), Twelvedata (stocks free tier), NYTimes API (free tier), Reddit JSON endpoint with spoofed User-Agent.
  • Printer’s character set is loosely Code Page 437; box-drawing and symbols are sent as raw hex (\xCD, \xF8); standard Unicode fails silently.
  • Custom PHP word-wrap function splits on spaces to prevent mid-word breaks at the 80-character page width before writing lines via fwrite().
  • Any API fetch failure exits the script early rather than printing a partial page, keeping output consistent.

Hacker News Comment Review

  • The dominant reaction is philosophical rather than technical: commenters framed the printer’s fixed page length as the core feature, contrasting finite daily information against engagement-optimized feeds.
  • A technical concern was raised about whether the author accurately identified the printer’s port type, suggesting the serial-vs-parallel distinction in the setup description may be incorrect.
  • Several commenters own comparable vintage printers (Apple ImageWriter, Atari 1025, daisy wheel) and are actively considering similar projects, including a question about ink ribbon shelf life that went unanswered.

Notable Comments

  • @reaperducer: “The news ends. I get informed, and I’m the customer not the continuously-scrolling feed addict” – sharpest framing of the finite-information argument.
  • @LtWorf: Flags that the author may be confusing serial and parallel ports in the hardware description.
  • @avgDev: Notes the irony that only Reddit headlines are printed, since that is how most Reddit users read it anyway.

Original | Discuss on HN