# A pocket FLAC player that runs a Spotify-style UI on a $20 ESP32-S3

Plug in headphones and the music follows them. Unplug and it pauses, like a phone. The whole thing runs on a Freenove ESP32-S3 display board with a 2.8-inch touchscreen.

- Category: Interface (build)
- Made by: [MrTartuf0](https://github.com/MrTartuf0) on GitHub
- Original: https://github.com/MrTartuf0/onda-flac-player
- On Afterware: https://afterware.xyz/p/a-pocket-flac-player-that-runs-a-spotify-style-ui-on-a-20-esp32-s3

## Can I build this?

- Difficulty: Intermediate
- AI-buildability: 4/5 (Nearly all the work is Arduino firmware (LVGL UI, FLAC playback, web uploader, USB mass storage) on an off-the-shelf board, with only a few DAC wires to solder.)
- Time: A weekend
- Cost: $30–50
- Parts: Freenove ESP32-S3 Display FNK0104B, PCM5102 DAC, microSD card
- Tools: Computer with Arduino IDE, USB-C cable, soldering iron

Estimates based on the original write-up. How the AI-buildability score works: https://afterware.xyz/ai-buildability

## Build sheet

- Board: Freenove ESP32-S3 Display FNK0104B
- Display: 2.8in ILI9341 touchscreen
- Audio: Built-in speaker, PCM5102 DAC
- Language: C++ (Arduino)

## Starter prompt

```
Based on "A pocket FLAC player that runs a Spotify-style UI on a $20 ESP32-S3" on Afterware: https://afterware.xyz/p/a-pocket-flac-player-that-runs-a-spotify-style-ui-on-a-20-esp32-s3

Write Arduino firmware for an ESP32-S3 board with a 2.8in ILI9341 touchscreen and a microSD card. Scan the card for FLAC files, read their tags, and show an album list with a now-playing screen. Play audio through an I2S DAC such as a PCM5102, and pause playback when headphones are unplugged. Use LVGL 9 for the UI.
```

## Story

onda plays FLAC files straight off a microSD card, through the board's speaker or through a PCM5102 DAC into headphones. The touch UI is modeled on Spotify and built with LVGL 9.5. Swipe up from the bottom edge for a control center with volume, brightness, battery and Wi-Fi. A tap can never push headphone volume above 75%.

The firmware is an Arduino sketch for the Freenove FNK0104B board. Turn on Wi-Fi and a web page lets you upload music, edit tags inside the FLAC files, fix covers and pull missing album data from MusicBrainz. Plugging the USB-C cable into a computer exposes the card as a flash drive, so you never pull it out to load music.

It's worth stealing for the small touches: a BOOT button that turns the screen off while the music keeps playing, and a resume feature that restarts the same song at the same position after power-off or a crash.

## Resources

- [Repository](https://github.com/MrTartuf0/onda-flac-player)
- [Hardware wiki](https://github.com/MrTartuf0/onda-flac-player/wiki/Hardware)
- [Build wiki](https://github.com/MrTartuf0/onda-flac-player/wiki/Building-and-Flashing)
- [Web interface wiki](https://github.com/MrTartuf0/onda-flac-player/wiki/Web-Interface)

Tags: esp32-s3, lvgl, flac, touchscreen, music player, pcm5102, microsd

AI assistants can search all Afterware builds through the MCP server at https://afterware.xyz/mcp (setup: https://afterware.xyz/agents).
