Stream album art from your Spotify account to a 32 by 32 WS2812B LED matrix via an Arduino UNO R4 WiFi board.
Album art by Tom Lehrer; public domain.
- Spotify Developer Account with Spotify Premium access
- Python 3.14+ for obtaining Spotify API refresh token.
- Arduino UNO R4 WiFi with USB cable.
- Four pieces of 32 by 8 (or 16 by 16) WS2812B addressable LED matrix panel. Total size of combined panels should be 32 by 32 pixels.
- 3 jumper wires for connecting the combined LED matrix to the Arduino.
- Optional: 470 Ω resistor to prevent voltage spikes from damaging the LED matrix.
- Optional: Enclosure for the Arduino and LED matrix panel; IKEA SANNAHED 35x35 cm works well, the inner 24x24 cm mount opening can be enlarged with a pen knife to fit the LED matrix panel snugly.
-
Install Arduino IDE on your computer.
-
Clone this repository.
-
Copy
arduino_secrets_dev.htoarduino_secrets.hand update your WiFi credentials inarduino_secrets.h.cp --update=none ~/spotify-album-art-matrix/arduino_secrets_dev.h ~/spotify-album-art-matrix/arduino_secrets.h
-
Sign in to your Spotify Developer account (Spotify Premium is required).
-
Create a Spotify app.
-
Fill in the following details
- App name:
Album Art Matrix - App description:
Display Spotify album art on a WS2812B LED matrix. - Redirect URIs:
http://127.0.0.1:3000/callback - APIs used: Select
Web API.
- App name:
-
Agree with the Terms of Service and click "Save".
-
In the Spotify dashboard, select your newly created app and copy the
Client IDandClient secretto the spotify-album-art-matrix/arduino_secrets.h file under the fieldsCLIENT_IDandCLIENT_SECRET. -
Run the following script to obtain the
REFRESH_TOKENfor Spotify API access:python3 get_refresh_token.py
Copy the refresh token from the output to the spotify-album-art-matrix/arduino_secrets.h file under the field
REFRESH_TOKEN.
-
From Arduino IDE, install
Arduino UNO R4 Boardsfrom Board Manager. -
Install the following libraries from Library Manager:
- ArduinoHttpClient by Arduino
- Adafruit GFX Library by Adafruit
- Adafruit NeoMatrix by Adafruit
- Adafruit NeoPixel by Adafruit
- base64 by Densaugeo
- TJpg_Decoder by Bodmer
-
Open and upload spotify-album-art-matrix.ino to your Arduino; ensure that the correct board (Arduino UNO R4 WiFi) and port are selected. Once uploaded, unplug the Arduino.
-
Daisy-chain the 4 WS2812B LED matrix panels together (Data Out of the first panel to Data In of the second panel, and so on). Data Out of the last panel should not be connected to anything.
-
Depending on how you arrange the panels, and how your panels are manufactured, you may need to adjust the
Adafruit_NeoMatrix *matrix = new Adafruit_NeoMatrixvariable configuration in spotify-album-art-matrix.ino to ensure the pixels are mapped correctly.
Caution
Ensure that the Arduino is unplugged when connecting the LED matrix panel to avoid any potential short circuits or damage to the components.
-
Connect the main WS2812B LED matrix panel to the Arduino as follows:
- LED matrix panel GND to Arduino GND
- LED matrix panel 5V to Arduino 5V
- LED matrix panel Data In (
⚠️ not Data Out) to Arduino Digital Pin 6 (with optional 470 Ω resistor in series)
-
Plug in the Arduino, and play a song on Spotify. The LED matrix panel should light up and start displaying the album art of the currently playing track.
When no Spotify client is active or when playback is completely stopped, baby panda 🐼 will be shown instead.
- This is not an official Spotify product or service.

