Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 2.5 KB

README.md

File metadata and controls

38 lines (30 loc) · 2.5 KB

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.