Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

VaAndCob/ESP32-S3-Mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-S3 Mastermind Game

🎬Watch on Youtube front

This repository contains the source code for a classic Mastermind board game, implemented on the WaveShare 7-inch Touch LCD for the ESP32-S3. The project includes the game logic, user interface created with SquareLine Studio, and drivers for the specific hardware.

A custom 3D-printable case was also designed for this project to provide a clean and integrated final product.

Features

  • Classic Mastermind Gameplay: Try to guess the secret 4-peg color code in 12 attempts or less.
  • Timed Mode: A 60-second countdown timer for each guess adds a layer of challenge.
  • Touch Interface: A fully touch-based UI for selecting colors and checking your guess.
  • Engaging UI: A retro-themed interface designed with SquareLine Studio and powered by the LVGL graphics library.
  • Hardware-Specific Drivers: Includes configurations for the LovyanGFX graphics driver and the CH422G I/O expander used on the WaveShare board.
  • Custom 3D-Printed Case: STL files for a custom-designed case are available to house the electronics.

Hardware

This project is specifically designed for the following hardware:

Software & Dependencies

Plase read README.md file in "sketch" folder

How to Play

  1. When the device powers on, it will display a "Restart" button. Press it to begin a new game.
  2. A secret code of 4 colored pegs is generated.
  3. Tap the pegs in the current row to cycle through the available colors.
  4. Once you have set your 4-peg guess, press the checkmark button on the right to submit your guess.
  5. Feedback pegs will appear:
    • White Peg: Correct color in the correct position.
    • Black Peg: Correct color but in the wrong position.
  6. You have 12 attempts to guess the code.
  7. A 60-second timer will count down for each guess. If you don't submit your guess in time, you lose the game.
  8. If you guess the code, you win! If you run out of attempts, you lose. The secret code will be revealed at the end of the game.

License

This project is open-source. Please feel free to use, modify, and distribute the code. If you create something cool, I'd love to hear about it!

About

An implementation of the Mastermind board game on an ESP32-S3 with a 7" touch display, including full source code and 3D case files.

Topics

Resources

License

Stars

Watchers

Forks