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

README.md

nhl_goal_light

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

Overview

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

run:

$ sudo apt-get install git mpg123 python3 python-pip3
$ sudo git clone https://github.com/arim215/nhl_goal_light.git 
$ sudo pip3 install -r requirements.txt

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

To start application, use following commands:

$ sudo python3 nhl_goal_light.py

Materials

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

Audio

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.


Delay

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.