The Mastodon Box

,

Last week I got the parts in for a Raspberry Pi Zero that I intended to use as a portable FLAC player with a display, similar to an iPod Shuffle in function. It has a 1000mAh battery thanks to the UPS HAT from Waveshare, alongside a Audio DAC SHiM and Inky pHAT e-ink display both made by Pimoroni. While the portable audio player is still my ultimate plan for this device, one thing I wanted to try before that was building a script that would pull and display the latest posts from my Mastodon feed on the display! Here’s what that looks like.

Riley's Raspberry Pi Zero 2W with an e-ink display showing a Mastodon post.

I’ve made an archive of the relevant scripts which you can download here if you want to see how it was done; it’s mostly a messy hodgepodge of bash scripts and Python used to update the display. Every sixty seconds it fetches a new post and displays it. The screen is rather slow to update, so each post is on screen for roughly 50 seconds total. Every six minutes it instead displays a battery readout. The battery seems to last for four or five hours total, but could easily be expanded with a larger battery (which is an upgrade I’m considering along with a larger screen).

Riley's e-ink Raspberry Pi Zero displaying the battery information.