Block Game
This is inspired by the pockeTETRIS project. I wanted to have circuit board that uses a larger screen, make it more comfortable to play without a case, and add a on/off switch.
Build
The design files are on EasyEDA
The PCBs need to be lead free since it is a hand held game.
ITEMS NEEDED
PCB - Menu then "Generate Fabrication File" - create Gerber or order at JLCPCB
1.3" OLED 128X64 - Make sure pins match PCB
3 - 10K Resistors
CR2032 Battery Holder BAT-HLD-001-THM
CR2032 Battery
Lead Free Solder
Soldering Iron
Cheap Toothbrush
Eye Protection for soldering, trimming, and cleaning.
SOLDERING
Most of this project is through the hole soldering, but it uses SMD buttons so there wouldn't be sharp edges on the back side. Surface mount soldering is new for me, so I'll share what I learned. To solder the SMD buttons, first melt solder onto 1 pad, remelt solder and slide 1 button foot into solder. Make sure the button is aligned before continuing. Next heat the pads and feet with iron and melt solder on top until a solder dome is formed. I learned SMD soldering from Collin's Lab.
Solder surface mount buttons before anything else.
Next, solder the Attiny85 socket and resistors on the backside. Match the socket notch with silkscreen outline. After, trim leads and then solder parts on the front side. Trim the rest of the soldering after finished.
CLEANING
The flux from the solder will leave a sticky residue. After Soldering use electronics alcohol to spray or cover the PCB and scrub with toothbrush. Use eye protection.
Program ATtiny85
Add Arduino IDE board support for ATtiny
Go to the "File" menu and select "Preferences" In the box labeled “Additional Boards Manager URLs” enter: https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json and click OK
Go to the “Tools” menu and then the “Board” select “Boards Manager” and then from the type drop down select “Contributed”: Select the “attiny” package and click the “Install” button.
After install completes, close the “Boards Manager” window and select
Board:“ATtiny25/45/85”
Processor: "ATtiny85"
Clock: "Internal 8 Mhz"
Program ATtiny
Need to program an Arduino for the AVR Programming Shield
Upload the "Arduino as ISP sketch" [File] -> [Examples] -> [Arduino as ISP].
Attached the AVR Programming Shield to Arduino
Socket ATTINY85 chip on the AVR Programming Shield
Select the Programmer, [Tools] -> [Programmer] -> [Arduino as ISP] Set program bootloader, [Tools] -> [Burn Bootloader]
Open PockeTetris Sketch in Arduino software
Upload sketch, [File] -> [Upload using programmer]
After you successfully upload the sketch, make sure the dot on the ATtiny85 and the socket notch are on the same side and push the chip into the socket.
Play
The middle button will change the block piece and drop it down when held. Also there is a pause mode that uses less power when the left and right buttons are hit simultaneously.
I've enjoyed building and playing this game.