35. Number Guessing Game

Objective

The task is to build a number-guessing game using a microcontroller, where the system randomly selects a number between 1 and 100, and the user guesses it through a serial terminal (e.g., PuTTY or Arduino IDE).

Requirements

  • The microcontroller compares each user's guess with the randomly selected number and provides feedback — “Too High”“Too Low”, or “Correct!” — until the correct number is guessed.
  • The total number of attempts taken by the user is recorded as their score and stored under a Leaderboard.
  • The game should retain the leaderboard data even after a reset or power loss; this is achieved by using EEPROM for data storage.

Why Use EEPROM?

  • EEPROM (Electrically Erasable Programmable Read-Only Memory) is a type of non-volatile memory that preserves stored data even when power is removed.
  • It is ideal for this application as it allows the system to store player scores and maintain a persistent leaderboard across power cycles and resets.

This task can be implemented with the following microcontrollers:

  1. ESP32
  2. Arduino UNO

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!