กลับไปหน้ารวมไฟล์
16x2-lcd-game-with-arduino-uno-1c238c.md

16x2 LCD Game with Arduino UNO

นี่คือเกมเล็กๆ เกมหนึ่ง หวังว่าคุณจะชอบมัน!

คุณสามารถเพิ่ม buzzer ได้หากต้องการ เชื่อมต่อ buzzer เข้ากับ pin 8

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

เกมย้อนยุคแบบอิง Character

โปรเจกต์นี้ผลักดันขีดจำกัดของ standard character LCD โดยการสร้างเกม "Dodging" แบบ side-scrolling ที่ปรับแต่งเอง

  • การกำหนด Custom Character: Arduino ใช้ lcd.createChar() เพื่อกำหนด "Hero" และ "Obstacle" sprites ขนาด 5x8 pixel สิ่งนี้ช่วยให้เกมสามารถแสดง graphics ที่เป็นเอกลักษณ์บนหน้าจอที่ออกแบบมาสำหรับข้อความเท่านั้น
  • Collision Matrix ความเร็วสูง: ทุกๆ 50ms, Arduino จะคำนวณการซ้อนทับแบบ pixel-perfect ระหว่างตำแหน่งปัจจุบันของ hero และ obstacles หากตรวจพบ crash จะมีการส่งเสียง game-over ออกทาง piezo buzzer

ความยากแบบ Dynamic

  • การปรับ Scale ความเร็วแบบ Exponential: เมื่อคะแนนเพิ่มขึ้น "Frame Delay" ใน Arduino code จะลดลง ทำให้การ side-scrolling เร็วขึ้นและท้าทายผู้เล่นมากขึ้น

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

title: "16x2 LCD Game with Arduino UNO"
description: "It's a small game where you use a pushbutton to jump over obstacles, when you touch an obstacle, it's game over..."
author: "Tiemovanloon"
category: ""
tags:
  - "game"
  - "pushbutton"
  - "lcd"
views: 15283
likes: 6
price: 1120
difficulty: "Intermediate"
components:
  - "1x Alphanumeric LCD, 16 x 2"
  - "1x Pushbutton switch 12mm"
  - "1x Breadboard (generic)"
  - "1x Jumper wires (generic)"
  - "1x Arduino UNO"
  - "1x Resistor 220 ohm"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "3e6d19cfd591308244ba574d70c9b5241ee6fd8ecbe16a688d2248100a16b7e1"
encryptedPayload: "U2FsdGVkX1/kG/0HAXjLlbRmCAODeOSq0B/xHJDuGWFh/Kk4bVrmzSBYxqLmiTNEw5LbhIRJ4lek+1E4m7RLaORlFWOhz9IqaJK0y1IN37c="
seoDescription: "Build a simple 16x2 LCD Game with Arduino UNO. Use a pushbutton to jump over obstacles in this fun DIY electronics project."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/16x2-lcd-game-with-arduino-uno-1c238c_cover.jpg"
lang: "th"