Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2026:jan.vaduva:bogdan.ciupitu [2026/05/15 14:20]
bogdan.ciupitu [3rd-party Libraries]
pm:prj2026:jan.vaduva:bogdan.ciupitu [2026/05/15 14:34] (current)
bogdan.ciupitu [Introduction]
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-**Dual-Controller OLED Tic-Tac-Toe** is a portable handheld gaming device specifically designed for two players. This project brings the classic game of Tic-Tac-Toe to a custom electronic platform built around an Arduino Uno board.+**Dual-Controller OLED Tic-Tac-Toe** is a portable handheld gaming device specifically designed for two players ​or player versus bot. This project brings the classic game of Tic-Tac-Toe to a custom electronic platform built around an Arduino Uno board.
  
 **Project Goals:** **Project Goals:**
Line 65: Line 65:
  
 **2D Array Representation**:​ The game board is stored in a int board[3][3] matrix, where $0$ is empty, $1$ is '​X',​ and $2$ is '​O'​. **2D Array Representation**:​ The game board is stored in a int board[3][3] matrix, where $0$ is empty, $1$ is '​X',​ and $2$ is '​O'​.
 +
 **Threshold Detection Algorithm**:​ Analog joystick values ($0-1023$) are processed using a hysteresis-like logic ($<300$ and $>700$) to prevent "​ghost"​ movements. **Threshold Detection Algorithm**:​ Analog joystick values ($0-1023$) are processed using a hysteresis-like logic ($<300$ and $>700$) to prevent "​ghost"​ movements.
 +
 **Win-Check Algorithm**:​ A deterministic function that scans 8 possible vectors (3 rows, 3 columns, 2 diagonals) for identical non-zero values. **Win-Check Algorithm**:​ A deterministic function that scans 8 possible vectors (3 rows, 3 columns, 2 diagonals) for identical non-zero values.
 +
 **Randomized AI Logic**: A pseudo-random selection algorithm that identifies available indices in the board matrix to perform automated moves. **Randomized AI Logic**: A pseudo-random selection algorithm that identifies available indices in the board matrix to perform automated moves.
  
Line 86: Line 89:
 ===== Results ===== ===== Results =====
  
 +The project resulted in a fully functional handheld console. The system successfully handles real-time input from two controllers without latency. The OLED display provides a clear interface, and the integrated Bot offers a challenging solo experience. The memory optimizations (using the F() macro) ensured the system remains stable during long play sessions.
 +===== Conclusions =====
  
 +//todo//
 +===== Source Code =====
  
-===== Conclusions ===== 
  
 +//todo//
 +===== Bibliography/​Resources =====
  
 +==== Software Resources ====
  
-===== Source Code =====+Adafruit GFX Library Documentation https://​cdn-learn.adafruit.com/​downloads/​pdf/​adafruit-gfx-graphics-library.pdf
  
 +Adafruit SSD1306 Library https://​github.com/​adafruit/​Adafruit_SSD1306
  
 +Arduino Reference - Tone Function https://​docs.arduino.cc/​language-reference/​en/​functions/​advanced-io/​tone/​
  
-===== Bibliography/​Resources =====+Arduino Reference - RandomSeed https://​docs.arduino.cc/​language-reference/​en/​functions/​random-numbers/​randomSeed/​ 
 + 
 +Memory Optimization (F macro) https://​docs.arduino.cc/​language-reference/​en/​variables/​utilities/​PROGMEM/​ 
 + 
 +==== Hardware ​Resources ==== 
 + 
 +Atmel ATmega328P Datasheet https://​ww1.microchip.com/​downloads/​en/​DeviceDoc/​Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf 
 + 
 +SSD1306 OLED Controller Datasheet https://​cdn-shop.adafruit.com/​datasheets/​SSD1306.pdf
  
 +Joystick Module (KY-023) Guide https://​arduinomodules.info/​ky-023-joystick-dual-axis-module/​
pm/prj2026/jan.vaduva/bogdan.ciupitu.1778844041.txt.gz · Last modified: 2026/05/15 14:20 by bogdan.ciupitu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0