กลับไปหน้ารวมไฟล์
mazuno-maze-for-arduino-debb83-en.md

Arduino uno random maze game

- random maze generator base on maze alghorithm

- two kind of bonuces

- ⭐ - need to pick up them all to unlock an exit

- ♥️ - increate a step count by 3

- exit when all ⭐ are collect

- ⛄ (step count) - limit of steps

try on WOKWI online

The Analog Map() Vector Calculus

A thumb-joystick doesn't output "Tilt Left." It outputs a massive integer block, perfectly resting at 512 when your thumb is off, and slamming down to 0 or rocketing up to 1023 when pushed entirely.

  1. The Uno executes an aggressively tight Analog Read loop on A0 (X Axis) and A1 (Y Axis).
  2. The Physics Conversion Trap: You cannot just write servoX.write(1023). A servo only understands 0 to 180 degrees. If you write 1023, the servo will spin infinitely against its physical stop and violently strip its own plastic gears, melting its internal coil!
  3. The Map() Math:
int joyX = analogRead(A0);
int servoAngleX = map(joyX, 0, 1023, 10, 170); // Converts ranges! Caps the absolute limits!
servoX.write(servoAngleX); // Safely blasts the hardware!

Creating Complex Mechanical Dampening

If the Map() function is completely linear, moving your thumb exactly 1 millimeter causes the massive wooden table to jerk 5 degrees instantly, catapulting the steel ball bearing off the maze into your face.

  • To create a beautiful, physical mechanical "Dampening" or "Smoothing" effect without buying expensive hardware gear-reductions, the programmer can utilize array-based software filtering.
  • By utilizing a Moving Average Array, the C++ code effectively slows down the chaotic thumb inputs. It mathematically averages the last 10 joystick reads, causing the servos to "Breathe" and gracefully tilt the heavy table, completely eliminating terrifying mechanical jitter!

Mechatronic Pivot Equipment

  • Arduino Uno/Nano (Standard functionality).
  • Two Sub-Micro SG90 Servos (Although heavy-duty MG90S metal gears are preferred to literally lift the heavy weight of the wooden labyrinth boards).
  • Dual-Axis Analog Joystick Module (KY-023).
  • Physical cardboard, balsa wood, or a custom 3D printed Labyrinth maze setup mounted on a universal mathematical pivot joint.

using

- U8G2 library for SH1107 I2C display 128X128

- 2 position xy joystic

- buzzer

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

apps:
  - "1x wokwi"
  - "1x Arduino IDE 2.0 (beta)"
author: "almostonline"
category: "Gaming & Entertainment"
components:
  - "1x Passive buzzer"
  - "1x Arduino Uno R3 compactable"
  - "1x Joistick Shield"
  - "1x SolderWire"
  - "1x 1.5\" GME128128-01-IIC"
  - "1x Arduino Uno"
description: "Kinematic puzzle physics! Build an interactive mechanical labyrinth by violently fusing twin-axis SG90 servo manipulation with raw analog thumb-stick vectors to physically roll a steel ball bearing."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://github.com/almost-online/mazuno/tree/main"
encryptedPayload: "U2FsdGVkX1/5EfV4X71pbaPi21Aar77TzrqUlkffyDEIVFGFHwF5Dj786lBEDaKfk6YI77YNiyHv2vES7CtiQWXqr5TE0Lug94mWuW6zKcGbwBuB0Cyb1fCBwWd5Px+9"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/mazuno-maze-for-arduino-debb83_cover.png"
lang: "en"
likes: 0
passwordHash: "3a98c97986690a36a4a31807aad7357e3234ac705169806da4dc468109a4fcc2"
price: 1120
seoDescription: "Unlimited Mazuno game for Arduino R3. Enhance finger coordination and brain skills for ages 3+. Fun and educational maze project."
tags:
  - "Games"
title: "Mazuno (Maze for Arduino)"
tools: []
videoLinks: []
views: 2763