SmartDarts is a web-based application designed to bring smart functionality to electronic dartboards. It is built to run on single-board computers (SBCs) like Raspberry Pi and interfaces with the physical dartboard via GPIO pins to accurately register hits. The project aims to make local dart games more engaging and interactive.
THIS IS A WORK IN PROGRESS AND LOTS OF FEATURES ARE MISSING.
-
Dartboard Integration:
- Uses GPIO pins to connect and interact with physical electronic dartboards. (currently only RPi supported, contributers welcome)
- Configurable for various dartboard models via a guided initialization process. This allows you to map specific pins to numbers on the dartboard. (not fully finished)
-
Player Support:
- Supports up to 8 players in a single game session. (X01 game (single out) only for now)
- WARNING: Lacks proper boundaries and will go beyond zero
-
Game Modes:
- X01:
- 180, 301, 501, 701, 901 -> Single Out
- X01:
-
Simulation Mode:
-
Its possible to run the application in simulation mode.
-
This DOES NOT require hardware components, wiring and physical dartboard, and is used for testing the application logic.
-
A script in root dir called
sim_cli.py
can be used to simulate throwing darts in specified game. Game must be initialized, players added and game started.
-
- Enhanced user interface.
- Additional game modes and options.
- Advanced analytics and scoring breakdowns.
- Remote game hosting and multiplayer support.
- Better README with more information on the topic
The dartboard connects to the GPIO pins of the SBC in a matrix configuration.
Each dartboard segment (e.g., specific numbers, doubles, and triples) corresponds to a row and column connection.
-
Matrix Layout:
- The dartboard uses a matrix system where rows and columns correspond to specific GPIO pins.
- When a dart hits a segment, it closes the circuit at the intersection of the respective row and column.
-
Resistors:
- Each column is connected via pull-down resistors to prevent floating signals and ensure stable readings.
To use SmartDarts (as intended), you will need:
- A single-board computer (e.g., Raspberry Pi) with GPIO support
- A compatible electronic dartboard. (nearly any can be used)
- Basic understanding of electronics
- Some thin wire (0.50 - 0.75mm)
- Some resistors
- Small solderboard (or breadboard for prototyping)
- Basic soldering skills (if using solderboard)
Installation has 2 methods, using standard pip or using uv (https://docs.astral.sh/uv/) Both methods are fine
- Clone this repository to your SBC:
git clone https://github.com/razorblade23/SmartDarts_v2_sbc cd SmartDarts_v2_sbc
Install the necessary dependencies:
sudo apt-get update
sudo apt-get install -y python3 python3-pip
python3 -m venv .venv
source .venv/bin/activate
pip install pip-tools
pip-compile pyproject.toml
pip install -r requirements.txt
Install the necessary dependencies:
uv sync
-
Run the application:
uv run run.py
-
Access the SmartDarts interface by navigating to
http://<your-sbc-ip>:5000
in your browser.
- Power up your SBC and connect it to the local network.
- Launch the application and configure your dartboard with guided proccess.
- Once configured, you can select a game mode and add players to begin playing.
- A script in root dir called
sim_cli.py
can be used to simulate throwing darts in specified game. - You can simulate throwing darts by entering
game ID
which is shown on the playfield - Darts are entered in format: [
M:S
] -> whereM
is multiplier andS
is score
- Examples:
D:8
,T:10
,S:25
,D18
,T17
, etc...
- You can enter only one dart at a time (to simulate real darts game)
Contributions are welcome! To contribute:
- Fork this repository.
- Create a branch for your feature or bug fix:
- Commit your changes:
- Push to your branch and submit a pull request.
This project is licensed under the MIT License.
- The Raspberry Pi community for GPIO libraries and support.
- Dart enthusiasts worldwide for game inspiration.
Enjoy playing darts with SmartDarts!