https://github.com/anthonyec/umpire
๐ Arduino library to track a table tennis match
https://github.com/anthonyec/umpire
arduino arduino-library ping-pong scorekeeper table-tennis
Last synced: 19 days ago
JSON representation
๐ Arduino library to track a table tennis match
- Host: GitHub
- URL: https://github.com/anthonyec/umpire
- Owner: anthonyec
- Created: 2019-01-09T21:57:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-06T09:00:23.000Z (almost 7 years ago)
- Last Synced: 2025-08-09T01:46:22.294Z (10 months ago)
- Topics: arduino, arduino-library, ping-pong, scorekeeper, table-tennis
- Language: C++
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Umpire
Arduino library to track a table tennis match.
**โ ๏ธWarning:** This library currently work in progress. Don't use it for business-critical table tennis tracking needs.
## Quickstart
```c++
#include
Umpire game;
void setup() {
// Add 1 point for player 1.
game.addScoreForPlayer(0);
// Add 1 point for player 2
game.addScoreForPlayer(1);
// Get which player is serving
game.getPlayerServing();
// Get score for player 1
game.getScoreForPlayer(0);
/ Get score for player 2
game.getScoreForPlayer(1);
// Reset the game
game.reset();
// Set player 2 to start serving
game.setInitialServer(1);
// Set player 1 to start serving
game.flipInitialServer();
// Set winning score and when deuce should take affect
game.setScoreToWin(21);
};
```