Skip to the content
2 layers60.3 × 58.4 mmStm, the printed circuit board in 3D

Catch the Ball is an embedded system game that runs on an STM32 microcontroller. This project uses an 11x7 LED matrix, a joystick, and a speaker to deliver an interactive gaming experience where the player controls a…

Size
60.3 × 58.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
6
Nets
33
Pads
50
Tracks, vias
43, 0
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
17 Mar 2025
Updated
29 Mar 2025

Overview

Stm is an open-source printed circuit board by Yunghub, from the Yunghub/STM32-Catcher-Game repository on GitHub. It is a 2-layer board of 60.3 × 58.4 mm with 6 parts on 33 nets, routed with 43 tracks and 0 vias.

It is built around the ARDUINO UNO R3. Its parts include 3 connectors and 2 capacitors. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

Catch the Ball Game

Catch the Ball is an embedded system game that runs on an STM32 microcontroller. This project uses an 11x7 LED matrix, a joystick, and a speaker to deliver an interactive gaming experience where the player controls a paddle to catch falling objects.

stm

Features

  • LED Matrix Display: An 11x7 LED matrix shows the game graphics.
  • Joystick Control: Move the paddle using analog joystick inputs.
  • Sound Effects: Non-blocking PWM beeps provide audio feedback when catching an object.
  • Dynamic Game Speed: The game accelerates as the player's score increases.
  • Button Interactions:
    • B1: Toggle pause/resume.
    • PB5: Increase game speed on a short press and trigger a game-over sequence on a long press.

Hardware Requirements

  • Microcontroller Board: NUCLEO-F401RE.
  • Display: 11x7 LED Matrix.
  • Input Devices: Analog joystick, push buttons (B1 and PB5).
  • Audio: Speaker for sound effects.
  • PCB: PCB design files are available in the PCB folder.
  • Programming Tool: ST-Link or any compatible programmer/debugger.

Software Requirements

  • STM32 HAL libraries
  • STM32CubeMX for initial configuration
  • GCC toolchain or a compatible ARM development toolchain

Project Structure

  • main.c: Contains the main game loop, initialization code, and interrupt callbacks.
  • ledmatrix.h: Header file for interfacing with the LED matrix (ensure this file is present in your project).
  • PCB Folder: Contains the PCB design files.
  • HAL and other peripheral configuration files: Automatically generated by STM32CubeMX.

How to Build and Flash

  1. Import the Project:
    • Open the project in your preferred IDE (e.g., STM32CubeIDE).
  2. Configure the Project:
    • Verify the microcontroller settings and ensure that all peripherals (ADC, TIM, I2C, UART, GPIO) are correctly configured.
  3. Build the Project:
    • Compile the project using the IDE’s build system.
  4. Flash the Firmware:
    • Connect your NUCLEO-F401RE board via ST-Link and flash the compiled firmware.

How to Play

  • Move the Paddle: Use the joystick to shift the paddle left or right.
  • Catch Falling Objects: Position your paddle under the falling object to catch it.
  • Increase Score and Speed: Each successful catch increases the score and slightly speeds up the game.
  • Game Over:
    • A long press on the PB5 button triggers a game-over sequence, displaying the final score.
    • Releasing PB5 after a short press will increase the game speed.

Code Overview

  • Joystick Handling: ADC with DMA is used to read the X and Y values, controlling the paddle’s position.
  • LED Matrix Updates: The screen is cleared and redrawn in every loop iteration to reflect the current game state.
  • Audio Feedback: PWM via TIM3 is used to produce beeps; the pitch varies with the player’s score.
  • Interrupts: External interrupts on buttons manage pausing and game control actions.

License

This project is licensed under the MIT License.

Author

  • Yung

Acknowledgments

  • Special thanks to the STM32 community and open-source contributors for the invaluable resources and libraries that made this project possible.

Parts

6
QtyValueFootprintReferences
2C_Polarized_USCapacitor_SMD:CP_Elec_8x11.9C1, C2
2Conn_01x05_SocketConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ1, J2
1Arduino_UNO_R3Module:Arduino_UNO_R3A1
1Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3

Similar boards

  • 2 layers68.8 × 53.6 mmRelatively Universal ROM Programmer, the printed circuit board in 3D

    Relatively Universal ROM Programmer

    AndersBNielsen/Relatively-Universal-ROM-Programmer

    Hardware to program W27C512 EEPROM or any 24/28/32 pin ROM requiring from 5V to 27V programming voltage.

    149 parts257GPL-3.0
  • 2 layers69.1 × 53.8 mmMotor controller, the printed circuit board in 3D

    Motor controller

    AlanFord/self-balancing-stick

    Dual Axis Reaction Wheel Inverted Pendulum

    25 parts79MIT
  • 2 layers68.6 × 53.3 mmProtogasm Board V2, the printed circuit board in 3D

    Protogasm Board V2

    Edging-Machines/Edging-Machines

    This repository is intended to contain as much information as possible about building, designing, prototyping, and using automated edging machines.

    14 parts67MIT
  • 2 layers53.8 × 69.6 mmEVSE V2 2, the printed circuit board in 3D

    EVSE V2 2

    PedroCNeves/AC_ChargingStation

    A learning project to create an EV AC Charging station based on an Arduino Uno

    32 parts50
  • 2 layers113.7 × 61 mmArduTester SMD, the printed circuit board in 3D

    ArduTester SMD

    jonsag/arduTester

    An arduino component tester based on https://create.arduino.cc/projecthub/plouc68000/ardutester-v1-13-the-arduino-uno-transistor-tester-dbafb4

    17 parts14
  • 4 layers65.9 × 52.9 mmMotor shield, the printed circuit board in 3D

    Motor shield

    DCC-EX/EX-MotorShield8874

    Design files for the open source 5A Motor Shield

    114 parts12
  • 4 layers68.6 × 53.3 mm101 PCB, the printed circuit board in 3D

    101 PCB

    ICRS/101

    The all-new open source Robotics 101 course from ICRS. It's specifically designed to be run in hackspaces, after school clubs and university societies.

    89 parts10CC-BY-4.0
  • 2 layers53.3 × 68.3 mmAnac 2040, the printed circuit board in 3D

    Anac 2040

    rallekralle11/Anna2040

    RP2040-based board in the shape of the Arduino uno

    63 parts9

Questions

How big is the Stm PCB?

It measures 60.3 × 58.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Stm use?

6 parts, built around the ARDUINO UNO R3. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Stm KiCad files?

From the Yunghub/STM32-Catcher-Game repository on GitHub, at the commit this page was made from: the board is PCB/stm/stm.kicad_pcb and its schematic PCB/stm/stm.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Stm design in my own project?

Its repository states no licence, so its author keeps all rights: ask Yunghub before reusing the design.