Table of Contents

Tic Tac Toe

Introduction

Name: Manea Andrei Iulian
Group: 331CB
Assistant: Alex Văduva

Description
The project is a physical implementation of the game Tic Tac Toe. Additionally, a speaker will play music in the background for better ambiance, there will be a buzzer to introduce a time limit for each move; it will signal when the player has 5 seconds left. Also, there will be a LED strip for a better visual effect.

Motivation
I think this is a fun game that I always used to play as a kid, so it's an additional motivation for me to implement it. It's simple, yet effective, and the fact that I can have „a pocket version” of it would mean a lot to me.

General description

I used two Arduino UNO R3 as µCs. For inputs, I will have a keyboard with four buttons for moving around the Tic Tac Toe grid and an additional button for selecting in which tile a symbol will go. The music will be played using microSD card reader for the input and a speaker for the output. A buzzer will also be used to signal the last five seconds until the player will have to make a move and the LED Strip will be used for visual enhancement. Finally, an LCD will be used to display the actual game.

Hardware Design

Materials:
2 x Arduino UNO R3
2 x mini breadboard
1 x button
1 x keyboard with 4 buttons
1 x LCD 1.44” SPI and ST7735 controller
1 x microSD/SDHC card module reader
1 x SDHC card
1 x speaker
1 X buzzer
1 X 220Ohm resistor
1 x XPT8871 mono audio amplifier
plenty of male-male and male-female wires

Circuit Layout

Circuit Design

Circuit Implementation

1. Arduino Uno (Rev3)

2. Voltage Regulators (U1 & U3)

3. TFT Display

4. MicroSD Card Module

5. Audio Amplifier Module (PAM8403) + Speaker

6. Passive Buzzer

Real-life Circuit

Software Design

  • Environment: Arduino IDE
  • Libraries: Adafruit_GFX; Adafruit_ST7735; TMRpcm

Given the fact that I have used two Arduino UNO, I have two separate codes. The first one runs the actual game logic and handles the input from the keyboard, allowing the player to move on the board. It also handles the timer for the buzzer, which makes a sound when the player has 2 seconds left for his turn. The second one is used to handle the speaker, taking the input from the microSD card reader.

1. Tic-Tac-Toe Game

2. Speaker

Here is the full code: https://github.com/LilAndy2/PM_Project

Results

Here is a short demo of the game in action.

https://youtube.com/shorts/_YSpUl_ECTo?feature=share

Conclusions

Download

Here is an archive with all the files of the project.

pm_project_andrei_manea.zip

Journal

06.05.2025 - decided on the project, wrote the description and the hardware materials
11.05.2025 - materials bought, starting on the hardware design
18.05.2025 - finished hardware design
19.05.2025 - uploaded circuit design and circuit layout
23.05.2025 - decided that LED strip component does not fit with the current hardware, so I removed it
26.05.2025 - implemented the software
27.05.2025 - filmed the demo of the game

Bibliography / Resources

Hardware Resources

Software Resources

Export to PDF