An ESP32 based Spotify Player.
Explore the docs »
·
Report Bug
·
Request Feature
·
A Physical Spotify Controller using an ESP32, 3 Buttons, Rotary Encoder and a 128x64 OLED Screen (SH1106).
- Plug the ESP to Power
- Navigate to the ESP_IP and login to Your Spotify Account
- Your Device should now be able to Control Music!
You need to have an application on the Spotify API Dashboard. Make sure that it has Web API enabled. You need to make the following modifications to the provided code:
- Rename the 'secrets_EXAMPLE.h' file to 'secrets.h'
- Change the placeholder values in 'secrets.h' to your values
- Run the program, You can see your ESPs IP on Serial Monitor (9600 Baud Rate) and on the OLED. You need to add the IP address of your ESP to REDIRECT_URI definition in 'secrets.h': https://YOUR_ESP_IP/callback
- Upload this new code to the ESP32
There are also some changes you need to make to the esp32_https_server library code to enable larger header size. Open the HTTPSServerConstants.hpp file Change the following values:
#define HTTPS_CONNECTION_DATA_CHUNK_SIZE 4096
#define HTTPS_REQUEST_MAX_REQUEST_LENGTH 8192
#define HTTPS_MAX_HEADER_LENGTH 4096
- Add the Redirect URI to the Spotify Web API via the Dashboard.
- Make sure the main.cpp, spotifyClient.h, spotifyClient.cpp, index.h and secrets.h files are in the same directory when uploading the code.
- Change constants in the esp32_https_server library
SCK -> D22
SDA -> D21
previous button -> D5
play/pause button -> D18
next button -> D19
CLK -> D4
DT -> D2
SW -> D15
- adafruit/Adafruit GFX Library@^1.12.0
- adafruit/Adafruit SH110X@^2.1.12
- madhephaestus/ESP32Encoder@^0.11.7
- bblanchon/ArduinoJson@^7.4.1
- arduinogetstarted/ezButton@^1.0.6
- fhessel/esp32_https_server@^1.0.0
- Inspired by MakeItForLess's Spotify Player