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
GPIO1Optional (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.


 
After I parted the case out I spent some time scrubbing the case down with dish detergent and using a liberal amount of Goo Be Gone to get all that sticky tape residue cleaned up. Once everything was clean and dry, I could spend some time attending to the smashed corner of the face plate. I had a couple of options for the repair, but I decided that the easiest (and structurally most secure) fix would be to recreate the corner using Green Stuff two-part epoxy. For folks not familiar with Green Stuff, it essentially is a two-part epoxy that you mix by hand and then mold like a really rigid Play Dough into to place. It is typically used a lot when kit bashing models for games like Warhammer 40K, when you need to sculpt a custom piece, and maybe adhere a particularly tricky portion of a model together. It works well, can be easily sculpted, and takes simple water-based acryllic paint just fine. I eyeballed the amount that would be needed to recreate the missing/damaged corner, mixed it up, and then went to work sculpting the corner as best as I could. Green Stuff sets pretty quickly - typically with 5-10 minutes - so I didn't have the luxury of time here. My goal was good, not great. After the epoxy set I mixed up a fairly good approximation of the color of the faceplate using acrylic paint to blend the repair in as best as I could. Overall, I'm pretty happy with it. From across the room it's not noticeable and the Green Stuff actually made the faceplate much more sturdy that it was previous to the repair.


 
Once the plastic was repaired I started brainstorming how to use the front channel display. I immediately though about using an Arduino UNO to power a small LED screen, since I'd used that pairing to great effect on a couple of smaller projects. I suppose I could have powered the LED's from the Raspberry Pi, but to be honest it was quicker and easier for me to wire up the display to an extra UNO R3 I had and I was able to repurpose a sketch that I had written for a handheld snake game. The Pi can power the UNO via USB, and if I ever want to change the display it is super easy to do (and doesn't affect the functionality of the Pi). It also gives me to option of adding a module for a remote control if want later down the line. I played around with different text for the display, finally settling on having an asterisk gliding across the display. It looked cool and I'm a sucker for moving LED's (let's just blame that on "Knight Rider"). After some tweaks for placement and a couple of generous blobs of hot glue to hold the screen in place, I had a functioning display that I could easily modify to anything that used a basic character set.
 

 
The final stretch was just to drop the Raspberry Pi into the box and get everything secured. I cut and glued some rubber welcome mat materials to the bottom of the case to assist with giving everything a nice, non-conductive floor to mount the pieces on, and mapped out the most efficient layout to screw everything down.

 



And there it is...a working retro "cable channel" that lives inside a period correct cable box with a customizable LED front panel. Eventually I will add an Arduino remote control module that I will use to change up the front display to a couple of different visual options. I still need to come up with a reasonable plan for cable management that will allow me to plug in a mouse and keyboard into the back. I can remote into the box from another computer to add videos if I want. Overall, I'm pretty stoked on this little project. I'd like to make another one at some point using a Raspberry Pi 3 with composite video so I can easily run the signal to one of the CRT televisions I have. This is the first project I'm done that has utilized both the Raspberry Pi and the Arduino boards and I love the flexibility of having both in a build. Now it's time to watch some TV!
 

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.

 

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:

  1. Figure out how to randomize/play/loop videos from a folder

  2. Determine how to “broadcast” the content (HDMI, Wi-Fi, etc.)

  3. 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:

  1. Prompt for the YouTube URL and the save folder

  2. Use pytube to get the highest-resolution stream

  3. 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?



 


 

 

Wednesday, October 1, 2025

DOOM!

A LAN game of Chocolate DOOM running on the unholy trinity (Windows, Mac OS, and Ubuntu).

 That is all.


 

Sunday, September 28, 2025

Through a Glass Darkly: Building a Philip K. Dick Inspired Text Adventure in Python

As someone who's spent countless hours lost in the paranoid, twisting realities of Philip K. Dick's novels, I’ve always thought it would be fascinating to bring that sense of dislocation and uncertainty into a playable form. At the same time, I have a deep love for the classic text adventure games of the 1980s, especially Infocom’s masterpieces like Zork, where every room, every object, and every line of text contributes to an immersive narrative. It occurred to me that blending these two interests could produce something truly engaging: a text adventure where nothing is quite what it seems, and every discovery feels like piecing together fragments of a memory.

I decided to code this game in Python, keeping a few core design goals in mind. First, I wanted the game to feel like an Infocom adventure, so I structured it around a series of interconnected rooms, each with its own description, items, and NPCs. The player moves through these spaces using simple two-word commands like "go north" or "take wallet," much like the old parser systems that made classic interactive fiction so approachable and fun.

The game engine itself is data-driven. Rooms, items, and NPCs are all stored in dictionaries with unique identifiers, which makes it straightforward to expand the world later. Each room defines its exits, items present, and NPCs in place. Items can have clues associated with them, and NPCs can offer dialogue that hints at larger mysteries. Using Python’s dataclasses made it easy to encapsulate these properties while keeping the code readable and maintainable.

Player actions are handled through simple functions tied to verbs: go, take, use, talk, and so on. For instance, when the player uses the take command, the code checks whether the item is present and portable, adds it to the inventory, and collects any associated clues. Use commands allow the player to interact with objects or room features to trigger additional story events, like unlocking a door or revealing hidden information. There's also a clue and memory system that monitors the player’s discoveries; once enough clues are collected, the player recovers a key memory, which acts as a milestone in uncovering their identity.

Save and load functionality was also important, reflecting the classic adventure game experience where progress mattered. The game can save the current room, inventory, NPC states, and collected clues to a JSON file, and restore everything from that file later.

The narrative logic is built around the idea of memory recovery in a dystopian world—a theme central to Dick's work. The player starts with no memory and must piece together their identity by exploring the environment, interacting with NPCs, and collecting items. Clues are scattered across the world, and certain items or interactions trigger additional revelations. The balance between exploration, discovery, and narrative progression aims to capture the same unsettling tension found in Dick's novels, where reality is mutable and perception is unreliable.

This project was a perfect pairing for my interests: the procedural, logic-driven structure of a text adventure married to the thought-provoking themes and disorienting world-building of Philip K. Dick. It's designed to be extensible, so I can easily add more rooms, items, and puzzles in the future. For fans of either classic interactive fiction or Philip K. Dick's writing, this game represents a small but enjoyable intersection of those worlds—a place where the past, memory, and reality are constantly up for interpretation.

The code can be downloaded here if you want to try it out.

Now to see if ChatGPT can pass the Voight-Kampff test...

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 ...