Adrian Jaroszewski d3ec758ac7 Updated README.md
2025-10-24 20:25:35 -04:00
2025-10-24 16:15:37 -04:00
2025-10-24 16:15:37 -04:00
2025-10-24 16:15:37 -04:00
2025-10-24 16:15:37 -04:00
2025-10-24 18:17:12 -04:00
2025-10-24 16:15:37 -04:00
2025-10-24 20:25:35 -04:00

pingpong-counter

A simple score counter for Ping Pong.

The hardware consists of an ESP32 dev board, an 8x32 MAX7219 LED dot matrix display, and two buttons.

Building

This project was built with the Arduino framework and uses PlatformIO for building, making it relatively easy to build for other boards.

First, install PlatformIO CLI on your system. Follow the instructions for your operating system on the PlatformIO website. If you are using Fedora (the operating system this project was developed on), run the command sudo dnf install platformio python3-pip.

Check the 'platformio.ini' file, and modify according to the board you are using.

The file 'src/main.cpp' defines the pins used for communication with the LED display and buttons under the commented line 'Hardware SPI'. The first two lines define the LED display (its actually 4 8x8 displays). The following 3 lines are for selecting the pins that will comminucate with the LED display. Check the documentation for your board to make sure you have selected the correct ones. Lastly, the last two lines are for defining the pins that will connect to the buttons.

Make sure your board is connected to your computer and from the project directory run the command platformio run -t upload.

Usage

On startup, the display will be blank. The first button press (either button 1 or 2) will decide which player serves first. The score will display 0 for each, with an arrow pointing to the serving direction. On button press, the corresponding player's score will go up, with the serving player changing every two points. The game ends when one player reaches 11 points, and the second has less than 10. The game can continue after 11 points until a point difference of two is reached. The game will end no matter what at 21 points. You will know the game has finished when the arrow between the two scores has turned into a dash. As of right now, there is no restart functionality, so the board has to be turned off and on to replay.

Description
No description provided
Readme 42 KiB
Languages
C++ 55.7%
C 44.3%