https://github.com/eitvisa/stm32-electronic-checkers-game
Interactive LED checkers game built with STM32 microcontroller and Bluetooth connectivity.
https://github.com/eitvisa/stm32-electronic-checkers-game
bluetooth c-language checkers electronics embedded hc-05 led microcontroller stm32
Last synced: 7 months ago
JSON representation
Interactive LED checkers game built with STM32 microcontroller and Bluetooth connectivity.
- Host: GitHub
- URL: https://github.com/eitvisa/stm32-electronic-checkers-game
- Owner: EitvisA
- License: mit
- Created: 2025-10-03T09:37:42.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-27T22:14:39.000Z (8 months ago)
- Last Synced: 2025-10-28T00:13:40.339Z (8 months ago)
- Topics: bluetooth, c-language, checkers, electronics, embedded, hc-05, led, microcontroller, stm32
- Language: C
- Homepage:
- Size: 14.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stm32-electronic-checkers-game
Interactive LED checkers game built with STM32 microcontroller and Bluetooth connectivity.
## Features
- Full LED-based game board representing two players (red and blue LEDs)
- Real-time piece movement: LEDs turn on, off, and blink according to game state
- Bluetooth connectivity via HC-05 modules for smartphone control
- Powered by a Lithium-ion battery
- Modular and maintainable C code structure
## Technical Overview
- **Microcontroller:** STM32F446 Nucleo
- **Language:** C
- **Communication:**
- STM32 ↔ HC-05 Bluetooth module via UART with DMA
- HC-05 ↔ Smartphone via standard Bluetooth serial
- **LED Control:** Direct GPIO manipulation
- **Core Code Structure:**
- `main.c` → game logic, Bluetooth input, LED updates
- `LED_control.c/.h` → controls LED states: on, off, blink, and color detection
## How It Works
1. **Initial Setup:** LEDs are initialized to display the starting board state (red on one side, blue on the other)
2. **Player Move:** Players send the **LED number** of the piece they want to move from their smartphone using a **Bluetooth serial terminal app**. Numbers are sent as HEX values corresponding to board positions
3. **LED Update:** The STM32 receives the LED number via UART and updates the LEDs:
- Blink the selected piece.
- Move it to the new position.
- Turn off any captured opponent pieces.
4. **Next Turn:** The system resets and waits for the next LED number
## Hardware
- **PCB:** Blank PCB with soldered LEDs
- **Microcontroller:** STM32F446 Nucleo
- **Power:** Lithium-ion battery
- **Bluetooth:** Two HC-05 modules
## Future Improvements
- Add a scoring system to track player points
- Implement automatic rule checking (valid moves, captures)
- Improve mobile interface for sending LED commands
- Optimize LED blinking animations for smoother visual effect
- Redesign hardware: replace direct GPIO LED control with shift registers for better scalability and simplified wiring
## Game board