Pico 2 W prints a newspaper every morning: pulls jobs from GitHub over HTTPS, streams them to a printer over IPP #19789
ierolsen
started this conversation in
Show and tell
Replies: 1 comment 5 replies
|
One way to handle time is an NTP query on power up. The Pico's RTC will keep time while powered up. |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I built a small system where a Raspberry Pi Pico 2 W running MicroPython 1.28 is the only part that runs at home. Every five minutes it asks a private GitHub repo whether a print job is waiting, holds the job until its print time, finds the printer on the LAN and streams the file over IPP in 4 KB pieces.
A few MicroPython details that took some work:
Dateheader and does not print until it has heard from GitHub. The date math (http_date_to_unix) is tested against CPython's calendar on 13 edge dates and 5,000 random ones.state.jsonthe moment the printer accepts it, so a crash or a reboot never sends it twice. A print that is cut off (I once switched the printer off mid-job) is sent again when the printer comes back.The pages are a two-page newspaper that a Claude Code routine writes overnight, but the Pico side is plain MicroPython and prints PDF, PWG raster or JPEG jobs, whichever the printer takes.
Code and a step-by-step Pico guide (docs/pico.md): https://github.com/ierolsen/coffee-edition-kit
Write-up with photos: https://erolsen.dev/writing/coffee-edition
I would like to hear how others handle time and watchdogs on the Pico W.
All reactions