Overview

Overview

We propose to build an interactive two-player memory game using the STM32L476G, Bluetooth module, and four different colored LEDs. The purpose of this game is to test the user’s memory by developing an interface where the first player creates an initial three colored pattern to toggle the corresponding colored LEDs one at a time. When the LED pattern is created, the same pattern will be displayed on the LEDs for the second player, leaving them to observe and input the correct pattern. If the pattern is inputted correctly the second player has to add to the colored LED pattern and display it on the LEDs for the first player to guess the pattern. The colored pattern will continue to grow until one of the players guesses it incorrectly. The first person who inputs the wrong pattern loses, prompting all lights to flash as a game over display. Throughout the game, there will be an LCD matrix display showing which player’s turn it is along with other significant patterns.

Peripherals

  • 4 different colored LEDS

  • HC-05 Wireless Bluetooth module

  • MAX7219 Dot Matrix Module

Software Design

Create a buffer with the initial pattern , and add on the buffer throughout the game. Create an interface where the users can select the the color they want to add to the pattern. Toggle the LEDs corresponding to the pattern one at a time, slow enough for the players to see the colored pattern. First checks if the pattern inputted by the players are correct , then it allows them to add on it.

Protocols

  • Bluetooth - UART

  • LED Matrix display - SPI

Goals

  • LEDs glow based on the users’ input of memorized pattern and new pattern, assuming the pattern is correct.

  • Patterns are recorded and incremented correctly

  • Add an LCD Display to show which players turn it is and display other game functionalities

  • Have correct interfacing between Bluetooth module/LCD Matrix and the STM32 Microcontroller to input the patterns

Group Responsibilities

Javier Jimenez is responsible for the Bluetooth module and creating a software interface for the users to play the game. Benigno Ortega is responsible for the LED and LCD peripherals and determining how to toggle the LEDs depending on the output and change the LCD display depending on whose turn it is. Both of us are going to work on developing a software script to structure the memory game. We’d also work together to implement the sound addition if time permits.

Block Diagram