Skip to content

itzzhashtag/Memory-Hunter

Repository files navigation

๐Ÿง  Memory Hunter

A Hardware Memory Game on Arduino UNO by Aniket Chowdhury (aka #Hashtag)

Status Platform Type


๐ŸŽฌ PROJECT OVERVIEW

Memory Hunter is a fully hardware-based memory game built on Arduino UNO with WS2812B NeoPixel strip, TM1637 7-segment display, and a passive buzzer.

The machine plays an ever-growing sequence of coloured light + sound cues. The player must repeat them back โ€” in perfect order.

One new step is added every round. Get it right and you level up. Get it wrong โ€” or take too long โ€” and it's dEAd.

๐Ÿง  How far can your memory take you?


โšก CORE IDEA

  • LED Strip = Atmosphere Engine
  • 4 LEDs = Game Colours
  • 4 Buttons = Player Controls
  • TM1637 = Score + Countdown Display
  • Buzzer = Audio Feedback System
  • EEPROM = High Score Memory

๐ŸŽฎ GAMEPLAY LOOP

  • IDLE โ†’ BUTTON PRESS โ†’ COUNTDOWN (33โ†’22โ†’11โ†’GO)
  • SEQUENCE PLAYS โ†’ PLAYER REPEATS
  • CORRECT = LEVEL UP โ†’ LONGER SEQUENCE
  • WRONG / TIMEOUT = dEAd โ†’ GAME OVER
  • HIGH SCORE SAVED โ†’ RETURN TO IDLE

๐Ÿง  WHAT MAKES THIS SPECIAL

  • โœ” EEPROM High Score โ€” survives power cycles
  • โœ” Idle Marquee Display โ€” 0--0 / HiSr / score cycling
  • โœ” NeoPixel atmosphere โ€” rainbow idle, pink game mode
  • โœ” Organic LED breathe โ€” each LED independently animated
  • โœ” 1-minute inactivity timeout โ€” only fires during gameplay
  • โœ” Countdown sequence โ€” 33 โ†’ 22 โ†’ 11 โ†’ GO
  • โœ” Unique tone per button โ€” full audio feedback
  • โœ” New high score celebration flash + jingle

โš™๏ธ GAME STATES

  • IDLE โ†’ Rainbow NeoPixel + LED breathe + high score marquee
  • TRANSITION โ†’ NeoPixel fade to pink + countdown
  • PLAYING โ†’ Sequence display + player input
  • LEVEL UP โ†’ Jingle + score increment
  • GAME OVER โ†’ dEAd flash + wah-wah sound
  • HIGH SCORE โ†’ Celebration flash + save to EEPROM

๐ŸŽจ VISUAL SYSTEM

State NeoPixel LEDs Display
Idle ๐ŸŒˆ Chasing rainbow Organic breathe 0--0 / HiSr / score
Transition ๐Ÿฉท Fade to pink Off 33โ†’22โ†’11โ†’GO
Game ๐Ÿฉท Solid pink Game colours Score
Game Over โฌ› Fade to black Flash + off dEAd

๐Ÿ”Š SOUND SYSTEM

Event Tone
Button 1 G3
Button 2 C4
Button 3 E4
Button 4 G5
Countdown C4 beeps
Level Up E4โ†’G4โ†’E5โ†’C5โ†’D5โ†’G5 jingle
Game Over DS5โ†’D5โ†’CS5 wah-wah sweep
High Score A5 flash โ†’ C6 pip
Start Press E5 confirmation beep

๐Ÿ† HIGH SCORE SYSTEM

  • Stored in EEPROM โ€” survives power cycles
  • Magic byte 0xAB detects first boot and initialises to 0
  • Beat the record โ†’ immediate save + celebration effect
  • Idle marquee cycles through 0--0 โ†’ HiSr โ†’ score display

๐Ÿ”Œ HARDWARE

Components:

  • Arduino UNO
  • WS2812B NeoPixel LED Strip (46 LEDs)
  • TM1637 4-digit 7-segment display
  • 4x PWM LEDs (game colours)
  • 4x Push Buttons
  • Passive Buzzer

โšก PIN MAP

Component Pin
Buttons D4, D5, D7, D8
Game LEDs D6, D9, D10, D11
Buzzer D12
TM1637 CLK D2
TM1637 DIO D3
NeoPixel Data D13
RNG Seed A5 (floating)

โš  Pin 12 is NOT PWM on UNO โ€” LED 4 uses pin 3 workaround โš  EEPROM: Address 0 = score, Address 1 = magic byte 0xAB


๐Ÿ“ฆ REQUIRED LIBRARIES

Install via Arduino Library Manager:

  • TM1637Display (by Avishorp)
  • Adafruit NeoPixel

๐Ÿง  ENGINEERING CONCEPTS

  • EEPROM non-volatile memory management
  • Non-blocking multi-LED animation engine
  • Finite state idle / game transition system
  • NeoPixel HSV rainbow + smooth fading
  • Independent per-LED organic breathe animation
  • Inactivity timeout scoped to gameplay only
  • Random seed from floating analog pin

๐ŸŽฌ SIMULATION

๐Ÿ‘‰ Wokwi Project: https://wokwi.com/projects/461780873004005377


๐Ÿš€ FUTURE UPGRADES

  • Difficulty selector (slow / normal / hard)
  • 2-player competitive mode
  • Bluetooth leaderboard via ESP32
  • Web score dashboard
  • LCD extended stats display
  • Animated sequence preview

๐Ÿ“ VERSIONS

Version Highlights
v1.0 Base game
v1.1 NeoPixel rainbow idle
v1.2 TM1637 score display
v1.3 Countdown + level jingle
v1.4 Timeout + LED breathe
v1.5 EEPROM high score + idle marquee + timeout fix

๐Ÿ“ธ Simulation

image

๐Ÿ“ธ Wiring & Schematic

image . image .

๐Ÿ‘ค Author & Contact

๐Ÿ‘จ Name: Aniket Chowdhury (aka Hashtag)
๐Ÿ“ง Email: micro.aniket@gmail.com
๐Ÿ’ผ LinkedIn: itzz-hashtag
๐Ÿ™ GitHub: itzzhashtag
๐Ÿ“ธ Instagram: @itzz_hashtag


๐Ÿ“œ License

This project is released under a Modified MIT License. It is intended for personal and non-commercial use only.

๐Ÿšซ Commercial use or distribution for profit is not permitted without prior written permission. ๐Ÿค For collaboration, reuse, or licensing inquiries, please contact the author.

๐Ÿ“„ View Full License
License: MITโ€“NC


โค๏ธ Acknowledgements

This is a solo passion project, built with countless nights of tinkering, testing, and debugging.
If you find it useful or inspiring, feel free to โญ the repository or connect with me on social media!


_ "The machine remembers everything. The question is โ€” can you?"

About

๐ŸŽฎ Memory Hunter ๐Ÿง  โ€” How far can your memory take you? Arduino memory game with NeoPixel atmosphere, TM1637 display & EEPROM high score persistence.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors