Tinker Toys

The week was dreary and about half as stressful as the next one promises to be, so I spent a few hours this weekend doing fun, “low level” stuff.

Gemini

Since I , and even though I have no plans to actually use the gemini:// protocol, I went and hacked together a simple and straightforward asyncio-based server for it.

It works well enough for playing around, and (for kicks) I also hacked a TLS socket handler (new in 2.2) to serve files. That led me to exploring how to hack TLS termination for raw sockets in nginx and caddy, so it was a little while well spent doing some mental gymnastics of how to expose services on alternate protocols.

So yes, I’d say Gemini is useful to broaden the mind, at least.

Home Automation

Most of my setup now relies solely on “pure” HomeKit rules and a handpicked amount of homebridge plugins, but there were a few things that I needed to fix:

  • My was acting up, so I re-wired it “directly” to zigbee2mqtt by way of .
  • I was collecting a bunch of useless stats and metrics on my dashboard (two year’s worth were nearly 800MB in sqlite3), and since is still single-threaded querying them for my dashboards hung up other stuff, so I trimmed everything back to 90 days’ worth of history.
  • I have a couple of ESP32 cameras and live streaming from them needs fixing, so I fiddled about with that a bit (without great success so far).
  • Since I’m considering ditching our MediaRoom IPTV set-top-boxes but (unfortunately) Vodafone Portugal still doesn’t support using Apple TVs (the two other major IPTV providers have done so for over two years now), I’m building a HomeKit shim to control our SHIELD Android TV via a network ADB connection, and it’s going pretty well.

Building a PICO-8 Desk Console

I’ve mentioned PICO-8 a few times already, but the degree to which it’s become popular here has been understated. My kids write mini-games on it, I have it installed on a dinky little portable console, and it is generally a delight to fiddle with (and something I really wish was shippable on the App Store, but that’s another topic althogether).

This week, while fixing a layout bug on my to unwind from a particularly annoying work afternoon, I realized that the square display the original version used was perfect for PICO-8 and, on a whim, bought a touch-enabled version and a few other doodads, which arrived yesterday morning.

How It Started:

Last evening I hooked it up to a Pi Zero W and got the display working fairly quickly:

Lots of nice detail here

The display is lovely once you sort out the driver issues, and it being 720 pixels square with a decent density and (it’s only 7.2cm tall/wide) means it’s quite pleasing to look at (once you remove the protective plastic).

How It’s Going:

Today, after futzing around with SDL for a bit, PICO-8 starts and works just fine:

Lovely retro chunkiness

There’s a little way to go yet, though, and these are my current Top 3:

  • Figuring out how to put (at least one) 3W speaker in a tiny case to make this fully standalone. I have a couple of audio SHIMs but this display takes up all the GPIO ports, so there’s some fun to be had with USB dongles–possibly tearing down one and soldering it to the board directly, but I suspect I’m also going to need a tiny amplifier.
  • Designing and printing a case for the whole thing (there are some designs out there, but I’d like to have a particular look).
  • Getting a mini 8BitDO Bluetooth gamepad to work with this (at least enough to browse games in ‘Splore).

Then there’s trimming down packages, optimizing boot times, etc., but first I want to get everything working.

I might use a Pi 3A+ instead since it has an audio jack, but right now I’m going to see how far I can go with the original Zero, since I don’t see a point to use more than a single 900MHz core here.

Also, for the sheer heck of it, I intend to try running a Classic Mac emulator on this as well. Even letterboxed, I bet it is going to look as cute as a button.

This page is referenced in: