ScoreBox Consoles
Python interface for scoreboard consoles manufactured by Daktronics and Colorado Time Systems
Supported Consoles
- Daktronics All Sport 5000
- 🏀 Basketball
- 🏈 Football
- 🏐 Volleyball
- 🤽 Water Polo
- 🤼 Wrestling
- Colorado Time Systems System 6
- 🤽 Water Polo
Installation
pip install scorebox-consoles
Usage
from consoles.sports import Basketball
if __name__ == '__main__':
basketball = Basketball('COM1')
game_state = basketball.export()
Calls to sport classes must be protected by an if __name__ == '__main__' because the serial connection is read in a seperate process
Connecting a Console
Consoles are connected with a Serial to USB cable.
Daktronics All Sport 5000 - Connect to the port labeled I/O Port (J6) with a DB25 to DB9 Serial connector
Colorado Time Systems System 6 - Tap into the 1/4" Scoreboard Out plug and connect the tip to pin 2 of a Serial DB9 connector and the shoe to pin 5.
API
Sport classes take a serial port string as an argument and expose an export method that returns the current game state. All sport classes also feature an on_update method that is designed to be reimplemented. It is called everytime the state of the game changes, depending on the settings of the console, this can work out to be 10 times per second or faster. on_update must take a single variable, a Python dictionary that corresponds to the game state values described below for each sport.
from consoles.sports import Football
def do_something(game_state):
# Do something useful with the parse score console information
# For example:
home = game_state['home_score']
visitor = game_state['visitor_score']
if home > visitor:
print(f'The Home Team leads {home} to {visitor}.')
elif visitor > home:
print(f'The Visiting Team leads {visitor} to {home}.')
else:
print(f'The teams are tied at {home}')
if __name__ == '__main__':
football = Football('COM1')
football.on_update = do_something
🏀 Basketball
| Key | Type | Description |
|---|---|---|
{home/visitor}_score |
int | Team Score |
{home/visitor}_timeouts |
int | Team Timeouts Remaining |
{home/visitor}_fouls |
int | Team Fouls |
{home/visitor}_possesion |
bool | Team Possesion Status |
{home/visitor}_bonus |
bool | Team Bonus (1-on-1) Status |
{home/visitor}_double_bonus |
bool | Team Double Bonus (2 shots) Status |
clock |
str | Main Clock Time (excludes timeout time), Tenths shown under 1 minute if configured in console settings |
shot |
str | Shot Clock Time, Tenths shown under 5 seconds if configured in console settings |
period |
str | Game Period |
🏈 Football
| Key | Type | Description |
|---|---|---|
{home/visitor}_score |
int | Team Score |
{home/visitor}_timeouts |
int | Team Timeouts Remaining |
{home/visitor}_possesion |
bool | Team Possesion Status |
clock |
str | Main Clock Time |
play |
str | Play Clock Time |
quarter |
str | Game Quarter |
down |
str | Down Number (includes ordination [ex. 1ST]) |
to_go |
int | Yards For First Down |
ball_on |
int | Ball Location on the Field (does not include side of field) |
flag |
bool | Flag Status (only updated on console button push) |
🏐 Volleyball
| Key | Type | Description |
|---|---|---|
{home/visitor}_score |
int | Team Score in Current Game |
{home/visitor}_sets |
int | Team Sets Won |
current_set |
int | Game Set |
🤽 Water Polo
| Key | Type | Description |
|---|---|---|
{home/visitor}_score |
int | Team Score |
clock |
str | Main Clock Time |
shot |
str | Shot Clock Time |
period |
str | Game Period |
Water Polo is supported on both Daktronics and Colorado Time Systems consoles: for Daktronics call WaterPoloDaktronics, for Colorado Time Systems call WaterPolo
🤼 Wrestling
| Key | Type | Description |
|---|---|---|
{home/visitor}_team_score |
int | Team Score |
{home/visitor}_match_score |
int | Match Score |
clock |
str | Main Clock Time |
period |
str | Match Period |
Metadata
Release files for scorebox-consoles 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scorebox_consoles-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for scorebox_consoles-1.2.0-py3-none-any.whl |
Release files / scorebox_consoles-1.2.0-py3-none-any.whl
| Download URL | scorebox_consoles-1.2.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
614a76177ae051108635c4abdc82821cf4895cdd0d127b2b7d3ddb8f8c6186ee
|
|
BLAKE2b-256 checksum How to use checksums |
e3fb08ef0df0408a1784fdb10058f586e809f0eb68cca187b538d4f01072af29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|
Security for scorebox-consoles 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.