Skip to content
Nhl goal light python for raspberry pi GPIO
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Update Aug 1, 2018 Update Nov 5, 2018
requirements.txt using pygame instead of mpg123 Jan 16, 2018


GitHub release GitHub commit activity the past year closed pull requests for GitHub license


Nhl goal light python3 for raspberry pi GPIO. Works with any team, just enter team name without city when prompted.

Before use, make sure you have:

python3, python3-pip, git

Run the following commands manually to install requirements


$ sudo apt-get install git mpg123 python3 python-pip3
$ sudo git clone 
$ sudo pip3 install -r requirements.txt

You can prepare a "settings.txt" file to auto-config the code, or the code will ask for your input everytime.

To start application, use following commands:

$ sudo python3


For documentation on how to wire the GPIOs with the lights and the button, pleaser refer to the "docs" folder.

  • Raspberry Pi (currently using raspberry pi A model, but any model will work)
  • Red Rotating Beacon Warning Light from ebay
  • 5V 2 Channel Relay Module from ebay
  • Momentary OFF ON Push Round Button
  • 12V to 5V 1A adapter (used a car usb adapter) would be good to have a dual usb adapter in case you need to plug something else like a usb speaker.
  • 3.5mm audio extension cable


If you wish to change the audio clips to sounds with your teams goal horn and music, just download them, rename them (goal_horn_#.mp3) and save them in the "audio" folder.


I've teste my code while watching Rogers Gamecenter Live and the stream seems to be a bit delayed, so I added a delay to my code to make the goal horn start later. You will be prompted to enter a delay that works with your stream.

You can’t perform that action at this time.