Today I’m excited to share a fun DIY project: a classic “Plane Shooting Game” built using an STM32 microcontroller and a 0.96” OLED display LGO12864A-096.
This mini game combines simple hardware with nostalgic arcade-style gameplay — perfect for electronics enthusiasts and embedded system learners.
The effect screenshots are as follows:

You can also check out the video demonstration effect:
🎬 Demo & Screenshots
Here’s a glimpse of the gameplay:
- Game Start Screen
- In-Game Action
- Game Over Scene
- Victory Screen
🎥 You can also check out the full demo video for a better look at the effects in motion.
🔧 Hardware List
- STM32F103C8T6 minimum system board
- 0.96” SSD1306 OLED display (128×64 resolution)
- 5 physical buttons
🕹️ Button & OLED Wiring
Function | STM32 Pin |
---|---|
Move Down | PA4 |
Move Right | PA5 |
Move Up | PB11 |
Move Left | PB10 |
Shoot | PA7 |
OLED SCK | PA11 |
OLED SDA | PA12 |
⚙️ Compilation & Download
- Development environment: Keil uVision
- HAL Library: Used for peripheral configuration’s

- Compiler requirement: ARM Compiler v6 or higher

- C++ version: Make sure it’s set to C++11 or higher

✅ If you’re using the provided source code, everything is already pre-configured.
⚠️ If you’re compiling manually and run into issues, double-check the compiler and C++ settings above.
🕹️ Game Overview
- Your plane can move up, down, left, right (on the left half of the screen)
- Shoot bullets to destroy incoming enemies
- Each enemy has 5 HP, so you need to hit them 5 times to eliminate them
- The game has clear start, win, and fail scenes with smooth transitions
This is the scene at the beginning of the game:

This is the scene in the game:

This is the scene of the game’s failure:

This is the scene of the game’s success:

It’s simple but surprisingly fun — and a great way to explore embedded graphics and input handling!
📂 Get the Source Code
The full project has been open-sourced!
To get the code or collaborate, feel free to reach out: