The SPS HC20 Suite contains two programs that control the SPS HC20 scoreboard by means of the custom-made, Arduino-based interface described in "Controllo di un tabellone segnapunti con Arduino" (italian only).
- consolle.py emulates the actual consolle that controls the scoreboard;
- report.py keeps track of an handball match events to help the technical delegates (score and time keepers) to compile the official match report sheet.
Arduino is natively supported by Windows 10 and almost all modern Linux distributions (those with a 2.6 or more recent kernel, see "Install the Arduino Software (IDE) on Linux" for details). The drivers for Windows 7 and previous versions can be downloaded from the official page.
The code uses the pyserial module.
Warning: if you intend to compile the Python code with py2exe and run it on Windows XP then the 2.7 release of pyserial must be used, see for example "On Windws[sic] XP not support CancelIO".
The scoreboard's siren may emit a very short buzz at program startup. The problem is attributable to the Arduino board's autoreset feature that causes the firmware to restart everytime the serial port is opened (see for example "Arduino reset after serial connection opened"):
Iep, Linux feature. I was solving this years ago, but no avail. After opening, Linux flip flop with RTS even if you are not using rts/cts flow control, it's hardcoded,
Other sources confirm this is the case, see for example "DTR and RTS control lines toggle unintentionally when opening port". Several platform-dependent solutions have been proposed, see for example "Disable DTR on ttyUSB0" for Linux-like environments, "Disable DTR in pyserial from code" for Windows. A simple work-around is to delay the scoreboard connection until the program is up and running:
- switch the computer on;
- connect the Arduino board to the computer;
- start the desired program;
- connect the scoreboard to the Arduino board.
A more reliable solution would be disabling the autoreset feature (see "DisablingAutoResetOnSerialConnection" for details), but it has its drawbacks: it prevents any future firmware upload.
Icons made by Freepik from www.flaticon.com.