Coder Social home page Coder Social logo

jediempi / rpi-led-nhl-scoreboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gidger/rpi-led-nhl-scoreboard

0.0 1.0 0.0 34.99 MB

Display live NHL game scores, start times, etc. on an LED matrix driven by a Raspberry Pi.

License: GNU General Public License v3.0

Python 100.00%

rpi-led-nhl-scoreboard's Introduction

Raspberry Pi LED Matrix NHL Scoreboard

Display live NHL game scores, start times, etc. on a LED matrix driven by a Raspberry Pi. Makes use of the unofficial NHL API for all game information.

Check out the accompanying blog post for more info and examples.

Example

Installation Instructions

These instructitons assume some basic knowledge of Unix and how to edit files via the command line.

  1. Flash an SD card with Rasberry Pi OS Lite on your personal computer.

  2. Unplug and replug the SD card.

  3. Add an empty file named "ssh" to the boot directory on the SD card. Navagate to the SD card and enter the following command.

    touch ssh
  4. Add and configure wpa_supplicant.conf.

    touch wpa_supplicant.conf
    

    Add the following to wpa_supplicant.conf using your text editor of choice. Configure the network information and two didgit country code as per your needs.

    country=CA
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
        ssid="NETWORK-NAME"
        psk="NETWORK-PASSWORD"
    }
    
  5. Remove the SD card from your personal computer and insert it into your Raspberry Pi. Boot up and SSH into your RPi.

  6. Set location/time zone and new password via raspi-config.

    sudo raspi-config
  7. Get the latest updates.

    sudo apt-get update -y
    sudo apt-get upgrade -y
  8. Disable on-board sound.

    sudo nano /boot/config.txt
    

    Edit the dtparam line to look like this:

    dtparam=audio=off
    
  9. Disable sleep.

    sudo nano /etc/rc.local

    Above the line that says exit 0 insert the following command and save the file:

    /sbin/iw wlan0 set power_save off
    
  10. Install pip3.

    sudo apt-get install python3-pip -y
  11. Install git.

    sudo apt-get install git -y
  12. Copy this repository.

    git clone --recursive https://github.com/gidger/rpi-led-nhl-scoreboard.git
  13. Install the LED Matrix Python package. Navagate to the root directory of the matrix library (/submodules/rpi-rgb-led-matrix @ dfc27c1) and enter the following commands.

    sudo apt-get update && sudo apt-get install python3-dev python3-pillow -y
    
    make build-python PYTHON=$(which python3)
    
    sudo make install-python PYTHON=$(which python3)
  14. Install any missing requirements. Return to the root of your clone of this repository and enter the following command.

    pip3 install -r requirements.txt
  15. Make main code run at RPi startup.

    nano ~/start-scoreboard.sh

    Copy-paste the following:

    #!/bin/bash
    cd /home/pi/rpi-led-nhl-scoreboard
    n=0
    until [ $n -ge 10 ]
    do
       sudo python3 rpi-led-nhl-scoreboard.py  && break
       n=$[$n+1]
       sleep 10
    done
    

    Save and exit by pressing CTRL-X, then Y, and then Enter.

    Make that script executable:

    chmod +x ~/start-scoreboard.sh
    

    Make the script run on boot:

    sudo crontab -e
    

    Add the following command to the bottom:

    @reboot /home/pi/start-scoreboard.sh > /home/pi/cron.log 2>&1
    

    Save and exit. Finally, test your change by rebooting your RPi.

    sudo reboot
    

rpi-led-nhl-scoreboard's People

Contributors

gidger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.