Embedded Systems / AVR Firmware / Hardware Integration
AVR Dodgeball Game on Arduino UNO R3
Project Summary
A real-time embedded mini-game built on an ATmega328P-based Arduino UNO R3 using direct register-level firmware, a 1.44-inch SPI LCD, joystick input, buzzer audio, EEPROM high-score storage, and a multiplexed 4-digit 7-segment display.
- Status
- Completed coursework project
- Role
- Firmware + hardware integration + visualization
- Stack
- AVR C/C++, ATmega328P, SPI LCD, ADC, Timer ISR
- Hardware
- UNO R3, joystick, buzzer, 74HC595, 7-segment display
I. Overview
This project is a hardware-driven dodgeball game implemented on an ATmega328P microcontroller. The player controls a paddle near the bottom of a 128 × 128 LCD screen while four balls bounce around the display. The objective is to survive as long as possible; the score increases once per second during gameplay, and contact between any ball and the paddle ends the round.
The focus was not just the game itself, but the embedded system design behind it: direct I/O register control, timer-based task scheduling, SPI display output, analog joystick input, EEPROM-backed high-score persistence, and peripheral coordination on a constrained 8-bit microcontroller.
II. What I Built
I built a complete embedded game loop with cooperative firmware tasks for the ball system, paddle control, collision detection, reset handling, game-state management, buzzer audio, score counting, and 7-segment display multiplexing. The system uses a finite-state machine with start, playing, and game-over states, while hardware buttons and joystick input control gameplay and high-score reset.
IV. System Architecture
Input layer
The joystick uses ADC input for left/right paddle control, while the LCD right button starts or restarts the game and the joystick press resets the stored high score.
Game logic
The GameMaster FSM controls GM_START, GM_PLAYING, and GM_GAME_OVER states while separate tasks update balls, paddle motion, collision checks, and score timing.
Output peripherals
The SPI LCD renders the game, the buzzer plays background audio and collision feedback, and the 74HC595 drives the multiplexed score display.
Persistence
EEPROM stores the high score so the system can preserve progress across resets, making the game behave like a standalone embedded device instead of a temporary demo.
V. Firmware Task Model
VI. Hardware Integration
The project required mapping firmware behavior to physical pins and peripherals. The LCD SPI bus used MOSI, SCK, CS, DC/A0, and RST connections; the buzzer used a timer-controlled digital output; the 74HC595 shift register drove the segment data; and analog pins handled joystick direction, joystick press, digit select, and the LCD right start/restart button.
Key signal assignments
Presenting the pin map clearly matters because this project is a hardware/software integration project, not just a graphics demo. Each visible component in the visual corresponds to firmware behavior in the embedded game.
VII. Technical Challenges
The main challenge was coordinating several peripherals without relying on high-level Arduino abstractions. The LCD, joystick, buzzer, EEPROM, shift register, and 7-segment display all had to share timing cleanly, while the game still needed to feel responsive. Breaking the firmware into tasks made the system easier to reason about and helped separate input handling, game state, display updates, and sound output.
Another challenge was making the project explainable. For a resume or portfolio, a finished board alone is not always enough; the viewer needs to see the firmware architecture, pin mapping, and hardware data flow. The interactive visualization was added to make the system readable even without the physical prototype present.
VIII. What This Project Demonstrates
This project demonstrates practical embedded engineering skills: using an 8-bit microcontroller under real hardware constraints, writing firmware around state machines and periodic tasks, debugging physical peripherals, and presenting the final system in a way that communicates both technical depth and product clarity. It is a strong resume project because it shows hardware control, firmware design, and system-level integration in one complete build.