Skip to content

divyagnan/nanoleaf-nfl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿˆ nanoleaf-nfl

color your nanoleaf based on nfl teams

๐Ÿšง under construction ๐Ÿšง

If your nanoleaf is setup in the 'correct' way (all in a straight line with 9 total panels) then running nanoleaf-nfl will search for the nfl games that are happening today and set the nanoleaf to the colors of the two teams which are playing.

In Action

gif showing what this does

On the day I recorded this gif (Thursday September 7th) the Patriots and Chiefs were playing the opening game. This gif shows the nanoleaf in its 'base' state (all white) and then nanoleaf-nfl kicks in and changes the color.

API

Table of Contents

init

Start up nanoleaf-nfl

Parameters

  • aurora any api to manipulate the nanoleaf
  • network any some api to make network calls
  • colors array array of colors for every nfl team

colorPanels

Get an array of panels with color change information

Parameters

  • panels array the list of sorted panels
  • colors array array of color objects
  • start number the index at which to start the slice
  • stop number the number at which to end the slice
  • teamAbbreviation string the abbreviation of the team

Returns array array of color transformations

setTeamLayout

Sets the layout to the color of the teams that are passed in

Parameters

  • api
  • colors array array of color objects
  • homeTeamAbbreviation string
  • awayTeamAbbreviation string

getNFLData

Get the list of games/scores from the nfl

Parameters

  • network any some api to make network calls

Returns any nfl data for the current week (games, week number, etc)

getTodayGame

Get today's game from a list of all games (or in the event that today is not game day, get the next closest game)

Parameters

  • games array the array of games this week

Returns object data for todays game (who is playing, score, etc)

About

color your nanoleaf based on nfl teams ๐Ÿˆ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published