กลับไปหน้ารวมไฟล์
lcd-i2c-video-game-507dee-en.md

I have always wanted to make a video game system, and when I heard about arduino, I have tried so much to make one, and here it is!

Hardware Overview

This portable gaming system utilizes an Arduino Uno paired with a 16x2 Alphanumeric LCD featuring an I2C interface. The I2C module is crucial as it reduces the complex parallel wiring of a standard LCD (which typically requires 12 or more pins) down to just four core connections: Power (VCC), Ground (GND), and the I2C data lines (SDA and SCL).

Circuit Connections

The wiring is designed for simplicity and portability:

  • LCD I2C Module:
    • VCC to Arduino 5V
    • GND to Arduino GND
    • SDA to Arduino Pin A4 (Standard I2C Data)
    • SCL to Arduino Pin A5 (Standard I2C Clock)
  • Input Control:
    • A single Push Button is connected between Arduino Pin 2 and Ground. This button acts as the primary "jump" or "action" trigger for the game mechanics.

Game Mechanics

The game typically functions as a "side-scroller" where a character (often a custom 'running man' character created using byte arrays on the LCD) must jump over incoming obstacles. The LiquidCrystal_I2C library is used to manage display updates, while the Arduino's internal millis() or delay() functions coordinate the timing of obstacle movement.

How to Play

Once the circuit is powered via a 9V battery or USB, the game begins on the LCD screen. As obstacles move from right to left, the player must press the push button at the correct time to jump. The score is often displayed in real-time on the second row or after the game concludes.

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

title: "Lcd I2C Video game!!"
description: "A cool little fun video game you can take on the go!"
author: "shassandanish1"
category: ""
tags:
  - "entertainment system"
views: 4029
likes: 1
price: 1120
difficulty: "Intermediate"
components:
  - "1x Push button."
  - "1x Arduino UNO"
  - "4x Male/Female Jumper Wires"
  - "1x Alphanumeric LCD, 16 x 2"
  - "1x I2C 16x2 Arduino LCD Display Module"
  - "1x Breadboard (generic)"
  - "1x Jumper wires (generic)"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "c1a9dde439ea3b394a1fea9851ba716ea0d5d8e2bbbbc5a2ceff26ec8f6d524d"
encryptedPayload: "U2FsdGVkX18YLot9esF3nxLLGi51BAbUsNiqsu0BJMJv6OpcEu+/PN7PZrWO42mE0Gq1qqG5uN/lJSW8wuBmj74o4IdD9qn9JsS/0odjwA8="
seoDescription: "Build a portable Video game with Lcd I2C and Arduino. A fun and compact DIY project for all."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/lcd-i2c-video-game-507dee_cover.jpg"
lang: "en"