About
Hello, I want to share my work on the project from nickthegreek82: arduino-touch-tic-tac-toe-game.
You need:
Wiring
The wiring is as following for the touch-screen:
- Touch -> Arduino Due
- T_IRQ -> 22
- T_DO -> 24
- T_DIN -> 26
- T_CS -> 28
- T_CLK -> 30
For the display:
- Display -> Arduino Due
- SDO -> A.25
- LED -> 3.3V
- SCK -> A.27
- SDI -> A.26
- DC -> 9
- RESET -> 8
- CS -> 10
- GND -> GND
- VCC -> 3.3V
08.22.2017
Modified the KI and some code optimization.
08.26.2017
Some code optimization.
08.27.2017
Can you win against the CPU?
03.13.2018
found a better way for the A.I.
thanks goes to klauscam https://github.com/klauscam/ArduinoTicTacToe
EXPANDED TECHNICAL DETAILS
High-Performance Gaming GUI
Leveraging the 32-bit power of the Arduino Due, this project features a high-fidelity, touch-controlled Tic Tac Toe game.
- 32-Bit Processing: The Due's SAM3X8E ARM Cortex-M3 processor allows for instantaneous screen refreshes and a sophisticated "Minimax" AI algorithm that makes the computer impossible to beat.
- Touch Coordinate Matrix: Uses a 2.8" or 3.2" TFT Touch Shield. The Arduino maps the resistive touch (X, Y) coordinates to a 3x3 game grid, handling "Debouncing" to ensure single, crisp moves.
Visual Polish
- Color Rendering: Uses the
MCUFRIEND_kbvandAdafruit_GFXlibraries to render smooth circles and crosses with antialiasing-like quality not possible on standard 8-bit boards.