Skip to content

GeorgeVerik/IntroductionToRobotics-Matrix-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

IntroductionToRobotics-Matrix-Project

Matrix Project homework for the Introduction to Robotics course (2025–2026)

Matrix Project

MAX7219-LED-Matrix-Display-with-Arduino

University Robotics · 2025–2026

Author: GEORGE VERYKAKIS


✔ Overview 🚀 Space Invaders – Arduino Matrix Game

An Arduino-based Space Invaders game developed for the Introduction to Robotics – Matrix Project.
The game runs on an 8×8 LED matrix (MAX7219) with an LCD menu system, joystick controls, sound effects, levels, and a boss fight with a countdown timer.


Matrix Project — Final Space Invaders 8x8 – Arduino Matrix Game

IMG_9616

A retro Space Invaders–style game built using:

  • 8×8 LED Matrix (MAX7219)
  • LCD 16×2 display
  • Joystick (X, Y, SW)
  • Arduino UNO/Nano
  • Optional buzzer
  • EEPROM for saving settings & highscore
  • Optional Ultrasonic sensor for dynamic speed

🕹 Features

  • Beautiful home menu (Start, Highscore, Settings, About)
  • Player movement with joystick
  • Shooting mechanic (joystick press)
  • Falling or horizontal enemies
  • Increasing difficulty & levels
  • Score system + saved highscore in EEPROM
  • Adjustable LCD & Matrix brightness
  • Sound on/off setting
  • Smooth animations
  • Ultrasonic sensor increases speed when hand is close

💻 Code

File


🎥 Demo Video

YouTube Video


🎮 Gameplay Overview

  • Control a spaceship at the bottom of an 8×8 LED matrix
  • Move left and right using a joystick
  • Shoot bullets to destroy incoming enemies
  • Enemies move faster as levels increase
  • A Mother Ship (boss) appears after enough enemies pass
  • You must destroy the boss within 15 seconds or you lose

📌 Controls

  • Joystick Left / Right – Move player
  • Joystick Button – Shoot
  • Joystick in Menu – Navigate options

📋 Menu System

Navigated using the joystick and displayed on a 16×2 LCD:

  • Start – Begin a new game
  • Highscore – Shows best score + player name (stored in EEPROM)
  • About – Game and author information

The menu is stable and only moves when the joystick is intentionally pushed.


👾 Mother Ship (Boss Fight)

  • Appears after a number of enemies pass the player
  • Moves horizontally across the top row
  • Has multiple hit points
  • A 15-second countdown timer is shown on the LCD
  • If the timer reaches 0 → Game Over
  • Destroying it gives bonus points and plays a sound effect

⏱️ Timing System

The game uses millis() instead of delay() for:

  • Enemy movement
  • Player movement
  • Bullet updates
  • Boss movement
  • Boss countdown timer

This allows smooth gameplay without freezing the Arduino loop.


🏆 Highscore System

  • Highscore is saved in EEPROM
  • When beaten, the player enters a 3-letter name using the joystick
  • Name and score persist even after power loss

🔊 Sound Feedback

A buzzer provides audio feedback for:

  • Shooting
  • Enemy hits
  • Level up
  • Mother Ship appearance
  • Mother Ship destruction
  • Game over

🧠 Levels & Difficulty

  • Score increases by destroying enemies
  • Every few points → level increases
  • Enemy speed increases with each level
  • Boss fights increase difficulty and pressure

⚙️ Hardware Wiring

MAX7219 LED Matrix

Matrix Pin Arduino
VCC 5V
GND GND
DIN 12
CS 10
CLK 11

Joystick

Joystick Pin Arduino
VRX A0
VRY A1
SW D2

LCD (16×2)

LCD Pin Arduino
RS 9
EN 8
D4 7
D5 6
D6 5
D7 4

Buzzer (optional)

Buzzer Arduino
+ D3
GND

Ultrasonic Sensor (optional)

Sensor Pin Arduino
TRIG A2
ECHO A3

🚀 Upload Instructions

  1. Open Arduino IDE.
  2. Install these libraries:
    • LedControl
    • LiquidCrystal
    • EEPROM (built-in)
  3. Open Final_Matrix_Project.ino in src/
  4. Upload to Arduino UNO/Nano

🧩 Files Description

  • Final_Matrix_Project.ino: Main sketch, initializes hardware, handles menu and game loop.
  • menu.h: Menu display, joystick navigation, About screen.
  • game.h: Gameplay logic: movement, shooting, enemy spawning, collisions, score, levels.
  • settings.h: Adjust LCD/matrix brightness, sound settings, save to EEPROM.
  • matrix.h: LED drawing helpers, sprite updates, clear matrix.
  • utils.h: Utility functions for general purpose.

🛠 Future Improvements

  • Animated splash screen
  • Multiple enemy types
  • Boss fight
  • Sound effects pack

About

Matrix Project homework for the Introduction to Robotics course (2025–2026)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages