DFRobot reached out to me recently, wanting me to use their special Arduino Nano board and OLED. At first I wanted to create a smart bike, and I built it to its entirety. But unfortunately the Nano was too weak to run and store the massive sketch that was needed. So I decided to revisit one of my previous projects, a Neopixel matrix that ran a Pong game. I wanted to make it portable instead, and a 1.7" OLED would make a perfect display.
For this Pong game I wanted to keep it relatively simple, which meant no computer controlled paddle or fancy ball reflection algorithms. Basically, there is a single paddle that a user can move up or down, and making the ball collide with the paddle would cause its x axis vector to flip. Each time the ball gets hit there is a sound that plays.
When the game device is powered on, a screen comes up with the game title and instructions. Additionally, my mother created a small theme song that loops in the background until the top button is pressed.
Designing the Gaming Device
My go-to CAD program is Fusion 360, so I decided to use it to design my pong gaming device. I began by designing each component used: an OLED, Arduino Nano, and a speaker.
Constructing the Device
I began by 3D printing each part, consisting of the lower half, the upper half, and 2 buttons.
Next I soldered a female header to the 4x6cm and wired it to the Nano. This not only allows for the OLED to be easily removed, but it also elevates it above the Arduino Nano. Check the schematic for wiring information.
Then I wired up the two buttons, along with a simple micro USB breakout board for power. The speaker was also attached and placed it its correct position.
My Fusion 360 design allows for 3mm machine screws to hold down the OLED, speaker, and connect the two halves of the device. But, I had to make them exact, so I used my drill press to bore out 8 holes: 2 for the speaker, 2 for the screen, and 4 underneath.