GithubHelp home page GithubHelp logo

conorhennessy / spotify-oled-control Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 48.83 MB

Spotify now playing on an OLED screen with added controls

License: GNU General Public License v3.0

Python 100.00%
spotify spotify-api raspberry-pi spotipy

spotify-oled-control's Introduction

Spotify-OLED

Spotify now playing on an OLED screen, with a volume dial A preview of a song now playing on an OLED screen attached to a RaspberryPi Zero A demo of the volume dial in action, showing Spotify with volume slider on display

Added controls to skip or go to previous track will be added in an upcoming version.

Getting Started

Parts List

  1. Raspberry Pi (or similar) with an internet connection
  2. I2C or SPI OLED display

Prerequisites

All Spotify API requests are made through Spotipy, a lightweight Python library for the Spotify Web API, where all methods in this library require user authorisation.

So, you will need to register yourself and create an app on the Spotify My Dashboard to get the credentials necessary to make calls (a client id and client secret).
Log into this dashboard with your Spotify account and note the credentials shown.

Required Packages

  • python3 sudo apt-get install python3
  • pip3 sudo apt-get install python3-pip
  • libopenjp2-7 sudo apt-get install libopenjp2-7-dev

Setup

  1. Connect OLED & configure rpi settings to enable it. External guide for this here.
  2. Use pip3 to install the following Python libraries
    • Pillow pip3 install pillow
    • luma.oled pip3 install luma-oled
    • Spotipy pip3 install git+https://github.com/plamere/spotipy.git --upgrade
  3. Modify config.txt with your app credentials from the Spotify developer dashboard.

Note: You may now wish to modify screen variables in Spotify_Oled_Control.py to suit resolution, I2C/SPI, etc values for your OLED display.

  1. Copy spotify-oled.service from the repo to /etc/systemd/system/ and run sudo systemctl enable spotify-oled.service (You can also replace enable with start or status for manual starting/stoping the service)

Note: It maybe be necessary to run sudo chmod +x Spotify_Oled_Control.py for autostart to work in some cases...

Credit

Big Credit to Alex, my housemate, for getting the ball rolling for this project, creating the services file and collab'ing on this project.

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.