0 Comments
I just added a Binary Watchface option and a “Pipboy Green” color scheme option for my Pipboy Mini.
Github has been updated. I love Fallout’s Pipboy (wrist computer), but the truth is it’s too big and clunky to actually be a daily worn device. I wanted to see if I could make a smartwatch with a similar vibe, but in a form factor small enough to be worn daily in the real world.
I decided to build this around Adafruit’s ESP32-S2 Reverse TFT board. This board is fairly tiny, and it has built-in features that I needed
I designed, 3d printed, and painted a case for the board that I think captures some of the Pipboy aesthetic. It’s held together with heat-set inserts and allen screws. Inside is a rechargeable lithium battery and a tilt sensor. The tilt sensor automatically turns the screen off when you’re not looking at the watch in order to extend battery life. The USB port can be accessed on the side without removing the case. The case can be used with any 22mm watch strap, but I had some nice scrap leather, so I just made my own leather cuff band. The way the watch works, is that on reset it gets the time and date from online NTP servers while connected to my home wifi. Then the ESP32-S2’s internal clock handles keeping track of time until the time is updated via NTP servers again. This seems to work well. (Traditionally, you would use a Real Time Clock or GPS module to keep accurate time, but that would have made the watch bulkier.) Likewise, I use OpenWeatherMap’s API to get weather data to the watch daily. I plan to add additional functionally in the future, but for now I’m happy with my Pipboy Mini. CODE Case STL File I found this beautiful antique wood radio at an antique store for $12. The electronics were pretty far gone, so I thought it would be a great choice for a mp3 project.
I cleaned and oiled the wood case, and salvaged what radio parts I could for future projects. From Temu, I purchased a fine copper mesh to use as speaker cloth ($2) and a DFPlayer Mini ($2). I loaded an SD card up with music from the 1920s to 1940s, then I wrote a simple script that will continuously play random tracks from the SD card. Using an Arduino and a 3W speaker I already had, I wired the circuit up. I decided to use the original radio knobs to control the Arduino, because that’s a lot more fun. I had to make a custom speaker mount out of some salvaged aluminum sheet I had, which turned out well. Finally, I put a couple of LEDs behind the dial to replace the original incandescent bulbs, and assembled everything. Here is the final result: I decided to house my voice assistant in this cool antique bakelite radio that I found at an estate sale. (The radio was in pieces and non-working, so it was a perfect candidate for my project.) I also upgraded the Raspberry Pi Zero W to a Pi 3 B+ which runs my code a bit better without getting too hot.
After removing the radio’s internals and giving the case a thorough cleaning, I mounted the components to an aluminum board using standoffs and then mounted the board in the radio with more standoffs. I think the end result looks great on my desk, and you can still see the LEDs through the original cloth speaker cover. I have made some progress with my Python voice assistant. I have it running on a Raspberry Pi Zero W with an Adafruit Voice Bonnet. The code doesn’t run as fast on the Pi Zero as it does on my pc, and it runs a little hot, but it does work. I’ll experiment with a Pi 3B+ later to see how the performance differs. I’ve added the code to GitHub for anyone interested.
I still need to create the JavaScript side of things to give the assistant more utility. And I need to build an enclosure for it, but sadly my ancient 3D printer has just shuffled off its mortal coil, so until I can afford a new printer the enclosure will have to wait.
I use my Alexa Echo devices daily for various purposes. While I find it incredibly useful, Alexa does have limitations, and it would be great if it were more customizable. I decided to try making my own voice assistant that I can fully customize to my needs. I attempted this many years ago when I was first learning how to code, and mostly failed. At the time, the only method available to me for speech synthesis was to have a database of pre-recorded audio files that I could call when appropriate, and that was very limiting. Now however, there is a nifty text-to-speech conversion Python library called “pyttsx3“. Using this library alongside Google’s cloud speech recognition API (which can be accessed using the SpeechRecognition 3.10.0 library) allowed me to put together a very capable voice assistant. At the moment, the voice assistant only has a few capabilities. It listens for a wake word to activate, and then can give you the current time or date, it can set a timer, it can search Wikipedia to answer questions, and it has some small-talk options. I intend to build in many more features, including fetching news headlines, giving weather forecasts, web scrapping various sites, setting reminders, sending emails, and controlling some of my smart home gadgets. Some of these features are going to require a web server running some custom JavaScript that can gather data from online sources and send that data to my voice assistant via JSON requests. So building the web app that will serve as an API to my voice assistant is one of my next steps. I also want the voice assistant to run on hardware as an IoT device, so that is going to take some tinkering. I have ordered the components I need to build this, and I am waiting for them to arrive. The final step will be deciding what to use to house my project. Maybe 3D printing an animatronic, talking head? Or recreating the Hal 9000? I haven’t decided yet. Developers tend to take their keyboards seriously. I have been using classic buckling spring IBM Model M computer keyboards since I first began programming. These are great to type on, and I still love them (kind of feels like typing on a typewriter), but I decided recently that I should upgrade to a compact keyboard that uses modern mechanical switches. This would give me more space on my desk, and allow for some customization. There seems to be an endless sea of options to choose from, though; the first step in my consumer journey is to narrow my options down to a few top brands, so what is a developer to do? I thought a good way to cut through the clutter would be to scrape the r/MechanicalKeyboards subreddit to see what brands are the most talked about currently. So I wrote a Python script that uses Reddit’s API to scrape the subreddit.
Reddit limits API requests to 1000 posts, so the most current 1000 posts is my sample size. My code outputs two files: the last 1000 posts, and more importantly the comments on those 1000 posts, which ended up being 9042 rows of data. (I posted the files to Kaggle if anyone would like to play with them.) Then I imported my comments dataset into OpenRefine so I could run text filters to find brand names, and I recorded the number of mentions for each brand. Finally, using Tableau, I created a couple of Data Visualization charts to express my findings. Here are the most talked about keyboard brands on r/MechanicalKeyboards currently: I decided to go with the Keychron keyboard that my research found to be the most discussed (and I also added Glorious Panda Switches and HK Gaming PBT Keycaps). Couldn’t be happier; it’s a pleasure to type on.
For a class project, I decided to reimagine Katsushika Hokusai’s seminal “Red Fuji” as ASCII art. Essentially, I wrote a Python script that converted Hokusai’s “Red Fuji” into text art using only the letters in Hokusai’s name. Since different letters have different visual weights, you can use them for gradations of shading. The script converts the image into black and white, then assigns a numerical value to each pixel depending on how dark the shading is. Then it replaces each pixel with the letter assigned to that shade range. I like how it turned out.
|