Skip to main content
Version: ACS CC

8-Puzzle Touch Console with Camera

A mini-console that turns your photos into an 8-puzzle you can play using the touchscreen or buttons.

info

Author: Alexandru Maria-Mihaela
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-maria-alexandru

Description

This project is a laptop-like mini-console equipped with an attached camera. When a game begins, the camera takes a photo that is sliced into a 3x3 grid, shuffled and one tile is removed to create a classic sliding 8-puzzle. Players must reassemble their picture by sliding the tiles using either the touchscreen or physical buttons. The interface also features a built-in timer that tracks both the current elapsed time and the player's best score.

Motivation

I chose this project because it is based on a console I had when I was little. I could take a picture and instantly play it as a sliding puzzle, and I wanted to recreate that fun experience.

Architecture

The software architecture of the console is modular, divided into distinct layers that separate the core game logic from direct hardware interaction. The main components are:

  • Game Engine: This is the software "brain" of the application. It manages the internal state of the 8-puzzle game (a 3x3 matrix), tracks the position of the empty space and validates allowed moves. It also evaluates the win condition (checking if the tiles are in the correct order) and keeps track of the move count or elapsed time.

  • Input Management Subsystem: It is responsible for capturing and processing user input (buttons pressed, movements made on screen).

  • Graphics & Display Subsystem: It is responsible for rendering the visual representation of the game state to the screen. This includes drawing the 3x3 grid, updating the positions of the numbered tiles, and rendering user interface elements (such as the move counter or timer).

  • Audio Subsystem: It translates specific game events triggered by the Game Engine into corresponding sound effects, such as a mechanical click when a tile successfully slides, an error tone for invalid moves, or a victory jingle when the puzzle is solved.

Log

Week 13 - 19 April

Ordered the hardware components.

Week 20 - 26 April

Week 27 - 03 May

Week 04 - 10 May

Hardware

  • STM32U5 microcontroller (Nucleo-U545RE-Q)
  • 3.5" Touch Screen 480x320 SPI TFT ILI9488: The display unit of the console
  • VGA Camera OV7670 640 x 480px: Captures images input for the system
  • Microswitches TC-1212T (12x12x7.3mm): Mechanical tactile switches used for the directional pad and user action buttons
  • Acoustic buzzer for microcontrollers: Provides auditory feedback and sound effects for various game events
  • DC-DC Step-up Module 1-5V to 5V: A voltage regulator that boosts the fluctuating battery power to provide a stable 5V output for the microcontroller and display

Schematics

Bill of Materials

DeviceUsagePrice
3.5" Touch Screen 480x320 SPI TFT ILI9488 (1x)Main display and visual output80.43 RON
VGA Camera OV7670 640 x 480px (2x)Capturing images/video input23.10 RON
Acoustic buzzer for microcontrollers (1x)Audio feedback and sound effects4.21 RON
Microswitch TC-1212T - 12x12x7.3mm SMD PCB (5x)Mechanical switches for user input/controls10.44 RON
Button cap for microswitch - Red (1x)Plastic cap for microswitch (Red)1.30 RON
Button cap for microswitch - Blue (1x)Plastic cap for microswitch (Blue)1.30 RON
Button cap for microswitch - Green (1x)Plastic cap for microswitch (Green)1.30 RON
Button cap for microswitch - Yellow (1x)Plastic cap for microswitch (Yellow)1.30 RON
Button cap for microswitch - White (1x)Plastic cap for microswitch (White)1.30 RON
4x AA Battery Holder SBH-341-2A (1x)Power supply holder for 4x AA batteries8.72 RON
DC-DC Step-up Module 1-5V to 5V 500mA (1x)Voltage regulator to provide stable 5V7.19 RON
Plexiglass mount for OV7670 camera module (2x)Physical mount for the camera module7.42 RON

Software

LibraryDescriptionUsage
st7789Display driver for ST7789Used for the display for the Pico Explorer Base
embedded-graphics2D graphics libraryUsed for drawing to the display
  1. How To Make Mini Laptop at Home