This project uses an ESP32 connected to an ILI9341 display, allowing real-time display of various information about the song currently playing on Spotify.
- ESP32
- ILI9341 display with touchscreen
To compile the project, the following libraries are required:
XPT2046_Touchscreen
Adafruit_ILI9341
Arduino_JSON
HTTPClient
JPEGDEC
base64
- Connect the components following the schematic below:

- Clone the repository:
git clone https://github.com/filipporaciti/SpotifyDisplay.git
- Before uploading the project, we need to calculate the calibration values for the touchscreen:
- Open the project in the
displayCalibrationfolder - Upload the project to the ESP32
- Touch the red square and note down the x and y values displayed on the screen
- Touch the yellow square and note down the x and y values displayed on the screen
- Open the project in the
SpotifyDisplayfolder - Change the TS_MINX value with the x value from the red square, TS_MINY with the y value from the red square, TS_MAXX with the x value from the yellow square, TS_MAXY with the y value from the yellow square
- Rename the
secrets.h.examplefile tosecrets.hand modify it with the correct values:
- WIFI_SSID and WIFI_PASSWORD with correct wifi credentials (you don't have to set both wifi credentials)
- For CLIENT_ID and CLIENT_SECRET values you have to create a new app here (you have to set
Redirect URIs = http://127.0.0.1:5000/redirectandAPIs used = Web API) - For ACCESS_TOKEN and REFRESH_TOKEN you can use get_spotify_token.py file.
- Upload the code to the ESP32
- (Optional) The files to 3D print the case are located in the
case_spotify_displayfolder
The firmware allows you to:
- Display the name of the song, artist, and album image currently playing
- Play, pause, skip forward, or go back through the song using the touchscreen
- You can set up to two Wi-Fi networks to connect the ESP32 to the internet
- The artist and song names get cut off when they reach the edge of the display (see demo image)
- Sometimes the image may not display (this happened to me only once)
- Currently playing song on Spotify
- Display calibration firmware
- Side of the case
- Back of the case



