While grappling with the daily existential crisis that modern life has devolved into, I wrote an app in Python that sits on my desktop and spits out a fusion of quotes by 80's cat icon Garfield and swinging space pirate Zaphod Beeblebrox. This is Zarphield. Feed him lasagna, Earth man.
Tuesday, November 18, 2025
Monday, November 17, 2025
Psuedo Spectrum Analyzer
Earlier this year I acquired two Elegoo MEGA2560 kits through Facebook market place. These kits are excellent entry points into the Arduino maker space. They come with boards and enough components and modules to keep the average nerd busy for awhile. Lately I've been looking at some of the modules that I didn't have strong thoughts on what to utilize them for and have started brainstorming ideas build some unique things. One of the modules in particular, the sound sensor module, got my attention. This module has a built in microphone and can be used for a variety of applications, such as a sound activated trigger or to capture audio for processing. After reading up on the module (this is one of the odd ball modules included in the kit that doesn't have a readily available board number associated with it), I decided to pair it with an old favorite of mine, the MAX7219 8x8 LED display. I used the MAX7219 to great effect in the cable box I built a couple of weeks ago and I love this one, in particular because it's super easy to get it working with an Arduino board and looks super cool in action. My goal was to create a sort of "spectrum analyzer" like you might see in older hi-fi stereo equipment racks. When I was a kid I had a spectrum analyzer program that I ran on my beloved Tandy Color Computer 2 that accepted input via a set of stereo RCA cables and displayed a dancing set of colorful bars that pulsed to the audio it was fed. This version would be much simpler. I would use the microphone from the sound sensor to listen for audio from the room it was setup in, and process the audio via a UNO R3 board, segmenting the sound into degrees of volume, and then display these lines of differing audio strength signals on the MAX7219.
Wiring up the components (the sound sensor and the MAX7219 display) was very straightforward. Both components are labeled clearly which pins do what (i.e. VCC, ground, etc.) unlike a couple of modules I've encountered in these kits (looking squarely at you DHT11 Temperature and Humidity Module). One everything was wired up it really was just a matter of getting the sketch pulled together to get the setup to capture the audio, "rank" the volume levels, and then display the results in an understandable way. There are essentially 6 steps in this process:
1. Read sound from microphone.
The sound sensor outputs and analog voltage that changes with the sound. It can output digital, but I ran into some issues getting that to reliably be read, so I opted for the easy route with analog output. The sound ranges in value from 0-1023.
int raw = analogRead(micPin);
2. Compare the sound to a dynamic baseline.
A baseline is used to represent the normal quite noise in the room. This gives us the difference between the current sound and the background. The sketch allows the baseline to adapt over time, which keeps the analyzer stable, even if the room becomes noiser over time.
int diff = abs(raw - baseline);
baseline = (baseline * 98 + raw * 2) / 100;
3. Convert sound level into bar height.
The difference is scale into a value from 0-8, matching the height of the MAX7219's 8x8 matrix.
int level = diff / 8;
4. Scroll the display to the left.
The entire display is shifted one column to the left. This is meant to mimic the way a real spectrum analyzer scrolls over time.
scrollLeft();
5. Draw the new bar on the right side.
The new sound level becomes a vertical bar in the far right column. Each LED row is turned on or off depending on the bar height.
drawColumn(level);
6. Update and refresh the MAX7219 display.
The display is updated all at once for a smooth animation.
matrix.control(MD_MAX72XX::UPDATE, MD_MAX72XX::ON);
Results
The result is a series of bars of different heights, continually scrolling to the left, with the bar height continually reacting to the volume of the sound it picks up. I can't really call this an actual spectrum analyzer, since there is only one sensor monitoring the room and not a series devoted to the various frequencies across the audio spectrum, but it still looks pretty cool.
Tuesday, November 11, 2025
Low-Powered FM Radio Transmitter with an Arduino and Si4713
Arduino boards are fantastic and versatile for constructing a wide range of electronics projects. One of the greatest strengths are the abundance of electronic modules that are available to add project specific functionality. I picked up a Si4713 board awhile back and decided to spend some time setting it up with an Arduino to see if I could get a functional low-powered FM transmitter running. The Si4713 boards are easy to come by and relatively cheap (I think I paid well under $20 including shipping for mine from a seller on ebay), and have minimal work required to get them hooked up. They come with headers that will need to be soldered onto the board and a very thin wire that is meant to serve as an antenna (which will also need to be soldered to the board).
The wiring between the Si4713 and the Arduino (I used an Elegoo Mega 2560 R3 I had lying around for this project) is as follows. Adjust the wiring and code as necessary depending on the model of the Arduino you use and your preferences for the reset pin.
| Wiring: |
|---|
| VIN | - | 5V |
| GND | - | GND |
| SDA | - | SDA (Pin 20) |
| SCL | - | SCL (Pin 21) |
| RST | - | Pin 2 |
| GPIO1 | Optional (RDS interrupt) | leave unconnected unless needed |
You will need to install the following Adafruit libraries for the board to work:
Adafruit_Si4713 Library
Adafruit_BusIO
Adafruit_GFX (if you want to later display station info)
I tried a couple variations on getting a functional sketch. I finally figured out that a persistent problem I was having involved the reset pin not properly resetting after the Mega has been disconnected from the power source and then rebooted. Modifying the sketch to allow for a delay to allow the pin to reset properly seemed to correct this. The updated sketch is below:
#include <Wire.h>
#include <Adafruit_Si4713.h>
#define RESET_PIN 2 // match whatever wiring you selected
Adafruit_Si4713 radio(RESET_PIN);
void setup() {
Serial.begin(115200);
delay(500); // time for power to stabilise
pinMode(RESET_PIN, OUTPUT);
// Toggle reset: LOW -> HIGH with pauses
digitalWrite(RESET_PIN, LOW);
delay(50);
digitalWrite(RESET_PIN, HIGH);
delay(200);
Wire.begin();
Serial.println("Attempting to find Si4713...");
if (!radio.begin()) {
Serial.println("Couldn't find Si4713");
while (1) {
delay(500);
Serial.println("Retrying...");
if (radio.begin()) {
Serial.println("Found Si4713 on retry!");
break;
}
}
}
Serial.println("Si4713 found!");
radio.tuneFM(10110);
radio.setTXpower(88);
}
void loop(){}
After I verified that the transmitter was operational, I decided I needed something cool to transmit. One of my first exposures to short wave radio was listening to "numbers stations", which are famously mysterious stations that broadcast cryptic messages. I fired up Garageband and recorded some esoteric sounding number station inspired audio ala' "Stranger Things" that I could endlessly loop on my station. I grabbed a receiver capable of tuning in FM and dialed up my frequency. I don't have to tell you how cool it was to hear my message looping over the radio! I did some proximity testing, moving the radio around the room and it seems like the effective transmission distance using the basic thin wire antenna provided with the Si4713 is about 15 feet. I believe I could improve the distance by building a better antenna, such as an optimized quarter-wave antenna - which might possibly extend the reach a bit more (maybe 25-30 feet).
Some future enhancements to this little radio station I can envision include: building a better antenna, fitting everything into a suitable enclosure, and adding an old ipad shuffle for audio to make this a truly mobile radio station.
Sunday, November 9, 2025
Constructing a homebrew "Cable Channel" Part 2
It's relatively easy to use a Raspberry Pi to approximate the experience of having your own custom cable television channel similar to what folks of a certain age may remember from their youth. In a previous post I went over some of the basic steps to get a Raspberry Pi 4 set up as a "retro box" that automatically plays a curated collection of movies and shows from the 1970s, including period correct public service announcements and commercials. After a couple of weeks of testing - which was essentially just letting the box run to make sure that the flow of the programing actually felt like watching period correct television - I decided that I needed to ramp things up. It wasn't good enough to just have a Raspberry Pi that played old movies and commercials. Any modern computer can do that. This needed to actually have the entire aesthetic of a classic 1970s cable channel. It needed to dress the part.
That's where eBay comes back. Some quick searching and I was able to locate an untested cable box circa early 80's for parts/repair that had a buy now price of only $3.81 (plus $12 for shipping). This box included a front channel display and was roomy enough to house both the Raspberry PI and an Arduino UNO (more on that below). I decided to go with the 80's style box, since the larger encloser would make it much easier to work with, and I had some ideas about utilizing the front channel display screen.
When the box arrive it was immediately obvious that the particular Jerrold 550 Starcom converter had lived a rough life. The was some serious damage to one corner of the plastic face plate due to what I can only attribute as "falling damage" from being dropped on a hard surface, and the unit was covered in old masking tape and 40+ years of grime. I also noticed that the unit's enclosure was secured with rivets, probably since the majority of these units were distributed by local cable companies and they didn't want to make it easy for industrious hackers to open them up to try to figure out how to get free Home Box Office. The first step was to drill out the rivets so I could take the unit apart.

Sunday, October 19, 2025
Using HTML to generate random horrors from beyond...
A webpage that generates random "Elder God" names in the style of H.P. Lovecraft? Sure! This started as a Python project that would generate a list of 10 random names in the style of the infamous Elder Gods from the Lovecraft pantheon. I had so much fun with that I decided to port it over to the land of HTML.
The page is available on my GitHub, in case anybody wants to summon an unthinkable horror with too many consonants.
https://robot-sword78634.github.io/elder-names/
The HTML uses the same syllable list and logic as the original Python code, but instead utilizes Javascript. It also adds some nifty apostrophes for that added Lovecraft flair.
Friday, October 3, 2025
Thursday, October 2, 2025
Let's create a cable TV channel!
I’ve become infatuated with Raspberry Pi single-board computers recently, and thanks to a low-grade eBay addiction, I now have several of them just sitting around, mocking me to make them useful. Recently, I read about someone who turned one into a sort of personal cable channel, and I got fired up on the idea of creating my own “cable channel” of highly curated videos—which I’m sure nobody else would want to watch.
It probably would have been easier to just follow the tutorial I found online for this type of project, but as usual, I felt it necessary to reinvent the wheel for the sake of “learning.” For me, the basic parts of getting a home cable channel working are:
-
Figure out how to randomize/play/loop videos from a folder
-
Determine how to “broadcast” the content (HDMI, Wi-Fi, etc.)
-
Decide what content to use
I kept the first part simple. Since I’d be running this project on a spare Raspberry Pi 4 with Pi OS, I decided to use VLC as the media player. VLC natively does everything I needed (randomize, play, loop from a folder), and it can be controlled via terminal/bash scripts—perfect for making everything restart automatically if the system reboots.
I skipped the broadcasting question for now and focused on getting the system running. The fun part, after all, was deciding on a theme for my channel and grabbing videos! I’ve always been a movie buff and grew up watching late-night “midnight movie” flicks on TV, so it was a no-brainer to load up the Pi with movies and shows that fit that vibe.
I could have taken the easy route and gone straight to the Internet Archive, but instead, I pulled material from YouTube. A little-known fact: YouTube not only streams video content but also allows you to download files. Since I’d need a large number of videos, I wrote a quick Python script to batch-download user-curated playlists. Python makes this easy with the pytube library, which was designed for this purpose. The script asks for a YouTube URL and a save location, then pulls down the highest-quality stream available.
At first, I ran into certificate errors on macOS. Instead of troubleshooting libraries, I just ran the script on an Ubuntu machine and it worked without issues.
The flow is straightforward:
-
Prompt for the YouTube URL and the save folder
-
Use pytube to get the highest-resolution stream
-
Download it to the folder
It’s a short and simple tool, but it does the job—a quick way to grab videos for offline viewing. After downloading a bunch of nostalgic movies and TV shows, I started scraping vintage 1970s commercials too. Since VLC randomizes playback, there’s a chance that after a movie or show, one or two commercials will play before the next feature. After raiding YouTube’s vaults, I had a solid library for my channel. Then came the fun part: testing and tweaking.
Long story short—it worked! It feels like watching a real TV channel from the 1970s. Videos flowed seamlessly from one to the next, with a nice balance of movies, shows, and commercials. (I might add more commercials later—it’s surprisingly fun to see a 1972 McDonald’s ad pop up.)
My startup bash script launches VLC at boot, runs everything in fullscreen, randomizes playback, and loops continuously without showing the user interface:
#!/bin/bash
vlc --fullscreen --loop --random /home/pi/Videos/
Right now, I have the Pi hooked up to a spare TV via HDMI, but I’m tempted to pick up an HDMI-to-RF modulator so I can run the channel on a CRT I keep around for playing Nintendo. Ideally, I’d love to broadcast to multiple TVs around the house—but I don’t know if I want to run 100 feet of coax cable just to watch Leonard Nimoy’s In Search Of in every room.
Or do I?
The Lost Art of Tree Fishing
Now that the Northeast seems to have finally shaken off the icy grip of winter, I've taken the first reluctant steps outside of my cave ...
-
I put it off for a bit, but if you’ve ever wanted to smoothen the experience of switching scenes in Unity, adding a fade transition can mak...
-
Creating a compelling death mechanic in a game can do wonders for the overall player experience. It’s not just about letting the player know...
-
One of the coolest things to do when learning game development is to challenge yourself by participating in a game jam. Game jams are essent...












