Skip to content

About

Gaming Hub is an STM32-based embedded gaming platform featuring Math Quiz, Memory Match, Snake, and Music Maker. It integrates an ST7735S TFT display, 8x8 LED matrix with 74HC595 shift registers, IR remote control, buttons, buzzer, and audio output through a resistor-ladder DAC. The project demonstrates GPIO, timers, interrupts, and modular design.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Gaming Hub โ€“ STM32 Embedded Gaming Platform

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.

๐ŸŽฏ Project Overview

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.

๐ŸŽฎ Games

๐Ÿงฎ Math Quiz

A mathematical challenge where the player answers generated questions using the available controls.

Difficulty levels:

  • Easy
  • Medium
  • Hard

๐Ÿง  Memory Match

A memory-based game where the player must remember and match displayed patterns.

The difficulty level affects the timing of the game.

๐Ÿ Snake

A classic Snake game implemented on the 8ร—8 LED matrix.

The snake movement speed changes according to the selected difficulty.

๐ŸŽต Music Maker

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

โš™๏ธ Hardware

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

๐Ÿ”Œ Pin Configuration

User Controls

Function STM32 Pin
UP PB0
DOWN PB1
SELECT PB3
IR Receiver PB7
Buzzer PB6

74HC595 Shift Registers

Signal STM32 Pin
DATA PA0
CLOCK PA1
LATCH PA2

Audio

Function STM32 Pin
Audio DAC Output PC15

๐ŸŽ›๏ธ Controls

Physical Buttons

Button Function
UP Move selection up
DOWN Move selection down
SELECT Select / Enter

IR Remote

Remote Button Function
PREV UP
NEXT DOWN
SELECT SELECT

The IR receiver uses NEC protocol decoding.

๐Ÿ–ฅ๏ธ Display Modes

Gaming Hub supports two display modes:

BOTH

Uses both:

  • ST7735S TFT
  • 8ร—8 LED matrix

TFT ONLY

Uses the TFT display while disabling the LED matrix visualization.

๐Ÿ”Š Audio System

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.

๐ŸŽš๏ธ Difficulty Levels

The system provides three difficulty levels:

  • Easy
  • Medium
  • Hard

Difficulty affects game behavior such as:

  • Memory game timing
  • Snake movement speed
  • Math Quiz difficulty

โš™๏ธ Settings

The Settings menu provides:

  1. Sound
  2. Difficulty
  3. Display
  4. High Scores
  5. Reset Scores
  6. Back

๐Ÿ—๏ธ Software Architecture

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.

๐Ÿ“ Project Structure

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

๐Ÿ› ๏ธ Development Environment

The project was developed using:

  • STM32 ARM Microcontroller
  • Eclipse-based embedded development environment
  • C Programming Language
  • ARM GCC / embedded toolchain
  • Git & GitHub

๐Ÿš€ Build and Run

  1. Clone the repository.
  2. Import the project into the Eclipse embedded development environment.
  3. Build the project.
  4. Connect the STM32 hardware.
  5. Program the microcontroller.
  6. Connect the TFT, LED matrix, controls, IR receiver, and audio circuit.
  7. Run Gaming Hub.

๐Ÿงฉ Embedded Concepts Demonstrated

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

๐Ÿ”ฎ Future Improvements

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

๐Ÿ“Œ Project Status

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.

๐Ÿ‘จโ€๐Ÿ’ป Team

  • Mohammed Wael Nabil
  • Youssef Sherif Abd Elgawwad
  • Ahmed Khaled Abdelaziz

About

Gaming Hub is an STM32-based embedded gaming platform featuring Math Quiz, Memory Match, Snake, and Music Maker. It integrates an ST7735S TFT display, 8x8 LED matrix with 74HC595 shift registers, IR remote control, buttons, buzzer, and audio output through a resistor-ladder DAC. The project demonstrates GPIO, timers, interrupts, and modular design.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages