กลับไปหน้ารวมไฟล์
gamepad-a-tiny-arduino-console-c97ab4-en.md

GamePad-Retro

When I was a kid video-games were simple and days spent playing with my Nokia 3310 in snake trying to beat my own record are countless. So my idea is to pay homage to some of my favorite retro games by creating a tiny retro console.

In particular for this project the following games are available:

  1. Snake
  2. Pong (with its infamous artificial intelligence)

Github repository (for additional files and code)

How it is done

Arduino components:

  1. Arduino board (Arduino UNO is fine)
  2. Prototyping board
  3. OLED Display 0.96" (SSD1306)
  4. Passive buzzer
  5. IR Transmitter and receiver

Circuit schema

External libraries

  1. ListLib: simple implementation of lists for Arduino GitHub source (*)
  2. ezBuzzer: non-blocking library for passive buzzer GitHub source (**)
  3. IRemote: library for decoding IR signals GitHub source
  4. u8g2: graphics library for drawing on an SSD1306 OLED display GitHub source; it provides some drawing primitives like: drawCircle(…) , drawBox(…), ...

(*) Arduino does not come with the STL (Standard Library), so we don’t have lists, queue or other data structure

(**) Arduino is a one core board and it does not support multithreading, so using the Tone(…) and NoTone(…) functions in combinations with delay(…), means that we cannot “beep” and in the meanwhile do other stuff in code. This library provides an “escamotage” for achieving this particular result

More details on how to import the code and the libraries in GamePad.pdf

EXPANDED TECHNICAL DETAILS

Micro-Handheld Gaming Engineering

"GamePad" is a miniaturized, portable gaming system built on the Arduino Nano or Pro Micro.

  • Display Interface: Uses a high-contrast 0.96" OLED (SSD1306). The graphics are rendered using the Adafruit_GFX library, optimized for fast sprite animation and font rendering at 128x64 resolution.
  • Tactile Inputs: Features a 4-way D-pad (buttons) and two "Action" buttons with internal pull-up resistors for responsive gameplay without input-lag.

Software Architecture

  • Game Engine: Includes a simple frame-buffer logic. Games like Tetris, Pong, or Snake are coded into the Arduino, demonstrating efficient memory management on a device with limited SRAM.

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

title: "GamePad, a tiny arduino console"
description: "An arduino-based tiny retro console, for playing either snake or pong. The code provided can be easily extended to include more (old and amazing) games made by you."
author: "edu_rinaldi"
category: "Gadgets, Games & Toys"
tags:
  - "Games"
views: 726
likes: 0
price: 2450
difficulty: "Intermediate"
components:
  - "1x IR Receiver"
  - "1x IR transmitter (generic)"
  - "1x Passive Buzzer"
  - "1x SSD1306 OLED Display"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://github.com/edu-rinaldi/GamePad-Retro"
documentationLinks: []
passwordHash: "d4b01064cbb6398bda2b40bad25c28937cd731228f554a86b1b0f56c33ae8d41"
encryptedPayload: "U2FsdGVkX18P/NB6wJOmNYZsDrYvkU8PaevLqeDRR3otS3juJwGpIwgoHNdQce9rPU4gpQT2y2aQQi9OraDSjQ9D6ICpul7NS3ycjQQz7hM="
seoDescription: "Build GamePad, a tiny Arduino retro console. Play Snake or Pong and easily extend the Code to create your own classic games."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/gamepad-a-tiny-arduino-console-c97ab4_cover.png"
lang: "en"