If the objective was to make the robot less creepy, I’ve failed miserably.
Category: Projects
Much like the first time I laid eyes on flip dots, when I learned of the computer-1 Mini-ITX case by Teenage Engineering I knew I had to get my hands on it. Maybe I have a thing for bright orange objects.
It’s been a few years since I built my previous PC and the Mini-ITX form factor has always been appealing to me for a workstation, so the hankering to do a new build was strong.
Though I’m a long time nerd it may be surprising that I’ve really only built one custom PC until now. This is mostly due to living in Mac-land and not being a hardcore gamer. My Linux servers have either been in the cloud or a leftover prebuilt that was “good enough” because Linux will pretty much run on anything (and that’s part of the fun).
Specs
The parts I went with are modest and didn’t need to be the latest and greatest. The goal for this build was a dependable workbench machine that won’t be my daily driver (iOS development pays the bills), nor replacing my gaming PC.
Augmented Airality
A project from a few months ago:
— Tanner Stokes (@TannerStokes) March 18, 2022
I wrote a macOS app that put particles on the screen to show air quality levels. A few floaters? You’re fine.
But if your screen looks like this, get out. 😂 pic.twitter.com/r5tniUZzK6
The 64×32 @adafruit Matrix Portal is a great device, just possibly a little too low res for an external macOS screen. #notquiteretina 😆 pic.twitter.com/MUzGMQQ3Xi
— Tanner Stokes (@TannerStokes) February 11, 2022
Snake Eyes + Servos
I saw flip dots (also called flip discs) last year for the first time and instantly knew I needed some in my life. If you’re not familiar with them, check out how they work!
The particular model I have is the ALFAZETA XY5, which may be the easiest way to get up and running, but certainly not the least expensive.
After getting the board, all you need is:
- 24V power supply
- Something that talks over RS485 (in my case I used an ESP8266 connected to a MAX3485 board)
- Their documentation that defines the controller data protocol
I plan to write in more detail how it all works, but for this demo the stack is:
- SwiftUI app that runs SwiftGFXWrapper (which is mainly Adafruit’s GFX Library under the hood)
- The app sends the entire pixel buffer over UDP to the ESP8266
- The ESP8266 sends data to the XY5 over RS485 using their controller’s protocol
For even easier prototyping, I’ve added Swift Playground support to my SwiftGFXWrapper project!
It felt good to complete this project that’s been on my list for quite some time. The main goal was to scrape the values from my modem’s status page and pipe them into InfluxDB, which feeds Grafana. Not only could I look at data trends, but I could receive alerts if certain values exceeded an acceptable threshold.
Overall this is a straightforward process:
- Pull in the HTML from the status page (which happens to not need any authentication, making it even easier)
- Parse the tables we care about (Downstream and Upstream) using XPaths
- Munge the data into something suitable for InfluxDB
- Insert the data into InfluxDB
- Query the InfluxDB data from Grafana
I knew I wanted to use Python for the project, so I first looked into Scrapy. After wrapping my mind around it (somewhat) I gave it a go and actually had a working solution… but it felt way over engineered and at times inflexible for what I wanted. I threw 90% of that solution away and went with a simpler script.
What I landed on was something that’s custom and lightweight, but extendable in case someone has a different status page or wants to use an alternative to InfluxDB.