Dual-Screen Electronic BattleShip Game With ESP32-C3
by matixvision in Workshop > 3D Printing
76 Views, 1 Favorites, 0 Comments
Dual-Screen Electronic BattleShip Game With ESP32-C3
Build a modern take on the classic Naval Combat board game using two ST7735 TFT displays, an ESP32-C3 microcontroller, and custom PCF8575 button controllers. This portable electronic version features stunning pixel-art ship sprites, sound effects via I2S audio, and three game modes: Player vs CPU, Player vs Player, and Statistics tracking with EEPROM-saved high scores.
Dual 128×160 TFT displays - Each player sees only their own screen during ship placement
Realistic naval sprites - 11×11 pixel-art ships (Carrier, Battleship, Submarine, Destroyer, Patrol Boat)
I2S audio engine - Dynamic sound effects: missile launches, explosions, victory fanfares
Smart AI opponent - CPU with hunting mode and target prioritization
Persistent statistics - EEPROM stores win rates, accuracy records, fastest completion times
Smooth controls - Auto-repeat joystick navigation with debouncing
Professional UI - Animated radar, color-coded status bars, visual feedback
Supplies
- 1 × ESP32-C3 Super Mini
- 2 × 1.8" ST7735 TFT LCD Displays (128×160 resolution)
- 1 × PCF8575 I²C I/O Expander (Address: 0x20)
- 2 × Thumb Joystick Switch 4+1-directions - 10x10x10mm
- 1 × MAX98357A Audio Amplifier Module
- 1 × Speaker 8 Ohms 2 Watts 2W 28mm
- 1 × 3D Printer (to print the STL enclosure model)
- 8 x Insert Nut M3_L3.0_D5.0
Print Frame 3D
Battleship Console – 3D Printing Description
The image shows a futuristic battleship control console with several electronic modules and mechanical elements mounted on a base panel. The design appears suitable for 3D printing as separate components, which can be printed either single-color or multi-color depending on the printer capabilities.
Gather Components
Hardware Assembly
The project uses as main components an ESP32-C3, two ST7735 1.8" 128x160 displays, a MAX98357A audio module, two mini joysticks with integrated buttons, and a mini speaker.
The two displays are managed via SPI interface, the MAX98357A module and the mini speaker are used for audio output, while the joysticks allow system control via directional axes and button press.
Hardware assembly:
- Secure the displays in their respective front slots.
- Install the two joysticks in the designated housings.
- Place the ESP32-C3, MAX98357A, and mini speaker inside the case.
- Arrange the cables neatly to avoid tension or interference.
- For all electrical connections, follow the wiring diagram provided in the project to correctly match pins, power, and signals between the modules.
Upload Firmware
For programming the ESP32-C3, use this link with a Chromium-based browser such as Opera or Chrome.
Note License
License
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).
You are free to share and adapt the project for non-commercial purposes, as long as you:
- Give appropriate credit
- Provide a link to the license
- Indicate if changes were made
- Distribute any derivative works under the same license
Commercial use is not permitted without separate permission.