Using a Nerf Hammershot and an Arduino, I built my own custom video game controller for the character of McCree in Overwatch. Overview The Arduino inside of the Nerf gun acts as a mouse and keyboard, sending HID commands over USB to the computer. The trigger and hammer are wired to buttons, and the cylinder is wired to a rotary encoder. Pulling the trigger fires, sliding the hammer back “fans the hammer”, and spinning the cylinder reloads. The gun also includes an inertial measurement unit (IMU) with an accelerometer and a gyroscope. This allows me to track movement for aiming. McCree’s…
With the LED characters in-hand, the next step is to write an embedded program to display integers and strings on the time circuit displays. The goal is to be able to set the characters for each display group based on simple variables, so doing something like displaying the time returned from a real-time clock (RTC) becomes trivial.
Before the time circuits can display the time, step one is figuring out what the “proper” LED characters actually are. There is in fact no standard set of characters for segmented LEDs, and the Back to the Future series takes some liberties with the alphanumeric segments. Still, I can do my best to reproduce them as faithfully as I can.
Now that all of the time circuit display electronics are in the mail it’s time to talk about programming the display. This starts with learning how to control LEDs with the Holtek HT16K33 integrated circuit (IC), which I’m using as the display’s matrix driver.
The time circuit display is a mix of three LED types: alphanumeric displays, seven-segment displays, and standalone 3 mm LEDs. Each one has a different height off of the circuit board and a different distance to the faceplate. I need to offset the components so all of the parts mate with the faceplate correctly, which requires sourcing LED standoffs and designing my own custom ones.
When it came time to start the programming for my time circuit displays, I needed a library of characters for segmented LED displays so that I could not only show the time, but also display strings of text. Maybe I wasn’t looking hard enough or I was looking in the wrong place, but much to my dismay I couldn’t find a readily-accessible library to use. So I’ve made my own and I want to share it so others don’t run into this same problem.
It’s been a long road to get to this point, but I’m finally at the stage where I can design the printed circuit board (PCB) for the time circuit display.
I’ve chosen the LED displays, found a matrix driver, and determined the final positions for each LED display on the faceplate. The next step in the time circuits project is to build a dedicated circuit board for each display. This process starts with creating an electrical schematic.