กลับไปหน้ารวมไฟล์
arduino-due-tic-tac-toe-with-touchscreen-51f0a5.md

Arduino Due TIC TAC TOE พร้อม Touchscreen

เกี่ยวกับ

สวัสดีครับ ผมอยากจะแชร์ผลงานของผมในโปรเจกต์จาก nickthegreek82: arduino-touch-tic-tac-toe-game.

สิ่งที่คุณต้องมี:

การเชื่อมต่อ

การเชื่อมต่อสำหรับ touch-screen มีดังนี้:

  • Touch -> Arduino Due
  • T_IRQ -> 22
  • T_DO -> 24
  • T_DIN -> 26
  • T_CS -> 28
  • T_CLK -> 30

สำหรับ 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

มีการแก้ไข KI และปรับปรุง code บางส่วน

08.26.2017

ปรับปรุง code บางส่วน

08.27.2017

คุณสามารถเอาชนะ CPU ได้หรือไม่?

03.13.2018

พบวิธีที่ดีกว่าสำหรับ A.I.

ขอขอบคุณ klauscam https://github.com/klauscam/ArduinoTicTacToe

รายละเอียดทางเทคนิคเพิ่มเติม

GUI สำหรับเกมประสิทธิภาพสูง

ด้วยการใช้พลัง 32-bit ของ Arduino Due โปรเจกต์นี้มีเกม Tic Tac Toe ที่ควบคุมด้วยระบบสัมผัสความละเอียดสูง

  • 32-Bit Processing: โปรเซสเซอร์ SAM3X8E ARM Cortex-M3 ของ Due ช่วยให้รีเฟรชหน้าจอได้ทันทีและมีอัลกอริทึม A.I. "Minimax" ที่ซับซ้อนซึ่งทำให้คอมพิวเตอร์ไม่สามารถเอาชนะได้
  • Touch Coordinate Matrix: ใช้ 2.8" หรือ 3.2" TFT Touch Shield โดย Arduino จะแมปพิกัด resistive touch (X, Y) ไปยังตารางเกมขนาด 3x3 และจัดการ "Debouncing" เพื่อให้แน่ใจว่าการเคลื่อนไหวเป็นแบบครั้งเดียวและแม่นยำ

ความสวยงามด้านภาพ

  • Color Rendering: ใช้ไลบรารี MCUFRIEND_kbv และ Adafruit_GFX เพื่อแสดงผลวงกลมและกากบาทที่เรียบเนียนด้วยคุณภาพคล้าย antialiasing ซึ่งไม่สามารถทำได้บนบอร์ด 8-bit ทั่วไป

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino Due TIC TAC TOE with Touchscreen"
description: "Another TIC TAC TOE game for the Arduino."
author: "rom3"
category: "Gadgets, Games & Toys"
tags:
  - "display"
  - "touch"
  - "games"
views: 13058
likes: 3
price: 2450
difficulty: "Easy"
components:
  - "1x Arduino Due"
  - "1x 2,8 zoll TFT LCD with touchscreen"
  - "1x Jumper wires (generic)"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/b01073e7-010b-41d2-b977-9f84ec139cec.ino"
documentationLinks: []
passwordHash: "86363c071dd02bc13327f057461166534600d7595f95217a353a849bf059a68c"
encryptedPayload: "U2FsdGVkX1+QTY516Ueamk7goJGwrTJxID81ttPXa0QAJJYsbOSlmeYxVWuKmLan1HBuuo6siX8h8mx337TT+YrxsM7beO3EZ/Y2jPUHmwg="
seoDescription: "Build a TIC TAC TOE game with Arduino Due and a Touchscreen. A fun and easy DIY Arduino project for beginners."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-due-tic-tac-toe-with-touchscreen-51f0a5_cover.JPG"
lang: "th"