This is a simple project to control/display Spotify playback using a rotary encoder and an OLED display.
It's GAMING because it has a cool RGB LED ring around the encoder.
ESP8266 (I used a Wemos D1 Mini) Rotary Encoder SSD1306 OLED Display WS2812 RGB LED Ring (24 Bit, but you can use any size you want, just change the code)
TODO
Install the following libraries:
- WiFiClientSecure
- Adafruit NeoPixel
- SpotifyArduino
- ArduinoJson
- SSD1306
Create a Spotify application and add the following redirect URI: http://localhost/callback
In order to obtain Spotify app client id and secret key, user must create a new Spotify app with her own account:
- Go to https://developer.spotify.com/my-applications/#!/applications/create
- Fill the form. Set Redirect URIs to
http://localhost/callback
and other fields to values of your choice. - When the app is created, copy Client ID and Client Secret values into the device.
Next, we need to obtain the authorization code:
- In the following URL replace <client_id> with your app client id and open the URL with your browser.
https://accounts.spotify.com/authorize/?client_id=<client_id>&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%2Fcallback&scope=user-read-private%20user-read-currently-playing%20user-read-playback-state%20user-modify-playback-state
- Authorize the app and you will be redirected to http://localhost/callback.
- Copy the code from the browser address bar. It is the authorization code.
Copy credentialsExample.h
to credentials.h
and fill in the required information.