Gaming Hub is an STM32-based embedded gaming platform that combines multiple interactive games with a TFT display, LED matrix, physical controls, infrared remote control, and audio output.
The project demonstrates practical embedded-systems concepts through a modular hardware and software architecture.
Gaming Hub provides a collection of four games controlled through physical buttons or an IR remote:
- ๐งฎ Math Quiz
- ๐ง Memory Match
- ๐ Snake
- ๐ต Music Maker
The system uses an ST7735S TFT display as the main graphical interface while an 8ร8 LED matrix provides additional visual feedback.
Audio output is generated through a resistor-ladder DAC connected to an audio jack.
A mathematical challenge where the player answers generated questions using the available controls.
Difficulty levels:
- Easy
- Medium
- Hard
A memory-based game where the player must remember and match displayed patterns.
The difficulty level affects the timing of the game.
A classic Snake game implemented on the 8ร8 LED matrix.
The snake movement speed changes according to the selected difficulty.
A simple interactive music system that allows the player to select and play musical notes.
The system supports two octaves:
- DO4
- RE4
- MI4
- FA4
- SOL4
- LA4
- SI4
- DO5
- RE5
- MI5
- FA5
- SOL5
- LA5
- SI5
| Component | Description |
|---|---|
| STM32 | Main microcontroller |
| ST7735S TFT | Main graphical display |
| 8ร8 LED Matrix | Game and status visualization |
| 74HC595 ร2 | Shift registers for LED matrix control |
| IR Receiver | Wireless remote control input |
| IR Remote | Remote navigation and game control |
| Push Buttons | Physical user controls |
| Buzzer | Sound indication |
| Resistor Ladder DAC | Audio signal generation |
| Audio Jack | External audio output |
| Function | STM32 Pin |
|---|---|
| UP | PB0 |
| DOWN | PB1 |
| SELECT | PB3 |
| IR Receiver | PB7 |
| Buzzer | PB6 |
| Signal | STM32 Pin |
|---|---|
| DATA | PA0 |
| CLOCK | PA1 |
| LATCH | PA2 |
| Function | STM32 Pin |
|---|---|
| Audio DAC Output | PC15 |
| Button | Function |
|---|---|
| UP | Move selection up |
| DOWN | Move selection down |
| SELECT | Select / Enter |
| Remote Button | Function |
|---|---|
| PREV | UP |
| NEXT | DOWN |
| SELECT | SELECT |
The IR receiver uses NEC protocol decoding.
Gaming Hub supports two display modes:
Uses both:
- ST7735S TFT
- 8ร8 LED matrix
Uses the TFT display while disabling the LED matrix visualization.
The audio system is implemented using a software-generated waveform and a resistor-ladder DAC.
The system uses:
- 8 kHz sample rate
- Timer-based audio generation
- Phase accumulator
- Multiple musical note frequencies
- External resistor ladder
- Audio jack output
The project also includes a Sound ON/OFF setting.
The system provides three difficulty levels:
- Easy
- Medium
- Hard
Difficulty affects game behavior such as:
- Memory game timing
- Snake movement speed
- Math Quiz difficulty
The Settings menu provides:
- Sound
- Difficulty
- Display
- High Scores
- Reset Scores
- Back
The project follows a modular embedded-driver architecture.
Main modules include:
- GPIO
- RCC
- NVIC
- EXTI
- TIM
- SysTick
- SPI
- ST7735S
- LED Matrix
- IR
- Audio
- DAC
The application logic is implemented in main.c.
Gaming_Hub/
โ
โโโ include/
โ โโโ GPIO_interface.h
โ โโโ RCC_interface.h
โ โโโ NVIC_interface.h
โ โโโ EXTI_interface.h
โ โโโ TIM_interface.h
โ โโโ SysTick_interface.h
โ โโโ SPI_interface.h
โ โโโ ST7735S_interface.h
โ โโโ LED_MATRIX_interface.h
โ โโโ IR_interface.h
โ โโโ AUDIO_interface.h
โ โโโ ...
โ
โโโ src/
โ โโโ main.c
โ โโโ GPIO_program.c
โ โโโ RCC_program.c
โ โโโ NVIC_program.c
โ โโโ EXTI_program.c
โ โโโ TIM_program.c
โ โโโ SysTick_program.c
โ โโโ SPI_program.c
โ โโโ ST7735S_program.c
โ โโโ LED_MATRIX_program.c
โ โโโ IR_program.c
โ โโโ AUDIO_program.c
โ โโโ ...
โ
โโโ system/
โโโ ldscripts/
โโโ .project
โโโ .cproject
โโโ README.md
The project was developed using:
- STM32 ARM Microcontroller
- Eclipse-based embedded development environment
- C Programming Language
- ARM GCC / embedded toolchain
- Git & GitHub
- Clone the repository.
- Import the project into the Eclipse embedded development environment.
- Build the project.
- Connect the STM32 hardware.
- Program the microcontroller.
- Connect the TFT, LED matrix, controls, IR receiver, and audio circuit.
- Run Gaming Hub.
This project demonstrates practical implementation of:
- GPIO configuration and control
- Timers
- External interrupts
- NVIC interrupt management
- SPI communication
- TFT display control
- Shift-register interfacing
- LED matrix multiplexing
- IR remote decoding
- NEC infrared protocol
- Software audio generation
- DAC signal generation
- Game-state management
- Menu navigation
- Embedded modular software architecture
Possible future improvements include:
- Additional games
- More advanced graphics
- Improved audio effects
- Persistent high-score storage
- Additional wireless controllers
- Improved game animations
- More advanced user interface
Current Status: Working Prototype
The core Gaming Hub system, games, controls, display system, IR remote control, LED matrix, and audio functionality have been implemented and tested on the STM32 platform.
- Mohammed Wael Nabil
- Youssef Sherif Abd Elgawwad
- Ahmed Khaled Abdelaziz