Documentation for the 3.5 inch ESP 32 display with the SD card.
The example_codes folder, you can find a list of example programs that can get you started with development on this board.
- Bouncing ball: Creates a red bouncing ball that goes around the screen.
- SD_card_file_explorer: Explore the files how have on the connected SD card!
- WiFi_Time_Display: Connects to Wi-Fi, syncs time with NTP, and displays a live clock on the screen.
- WiFi_Time_Weather_Display: Connects to Wi-Fi, syncs time with NTP, and displays a live clock plus current weather from Open-Meteo.
- SD_Web_File_Server: Hosts a small browser file manager for the SD card over Wi-Fi.
- Image_Display: Displays a BMP image on the screen.
- Use This converter to turn your image into a 480x320 BMP image.
- Save it as "image.bmp" on your SD card.
- Spotify_Now_Playing_Display: Connects to Wi-Fi, reads your Spotify currently playing song, and displays album art plus track details.
- Celeste_Classic_ESP32: Runs a silent, touch-controlled Celeste Classic port. Copy the example's
data/gfx.bmpanddata/font.bmpto/celesteon the SD card before flashing.
- Copy
.env.exampleto.envfor local Wi-Fi values..envis ignored by Git. - Arduino IDE does not automatically load
.envfiles. To use local values at compile time, copyexample_codes/WiFi_Time_Display/wifi_config.h.exampletoexample_codes/WiFi_Time_Display/wifi_config.hand edit that file. wifi_config.his ignored by Git, so private hotspot passwords stay out of GitHub.
- Flash
example_codes/WiFi_Time_Weather_Display/WiFi_Time_Weather_Display.ino. - The sketch uses Open-Meteo for current weather, so no API key is needed.
- To set your weather location, copy
example_codes/WiFi_Time_Weather_Display/wifi_config.h.exampletoexample_codes/WiFi_Time_Weather_Display/wifi_config.hand editWEATHER_LATITUDE,WEATHER_LONGITUDE, andWEATHER_LOCATION_NAME. The example uses placeholder coordinates so your location is not committed. - It refreshes the clock every second and weather every 10 minutes.
- If the weather stays unavailable on
UMBC Visitor, the ESP32 may be behind a captive portal or need MAC approval for internet access.
- Flash
example_codes/SD_Web_File_Server/SD_Web_File_Server.ino. - The sketch uses the same SD card setup as the other examples:
SD.begin(5). - By default it connects to
UMBC Visitorwith no password. To use a different network, copyexample_codes/SD_Web_File_Server/wifi_config.h.exampletoexample_codes/SD_Web_File_Server/wifi_config.hand edit it. - The browser login defaults to username
adminand passwordesp32. ChangeFILE_SERVER_USERNAMEandFILE_SERVER_PASSWORDinwifi_config.hbefore using it around other people. - After Wi-Fi connects, the display shows a URL like
http://10.x.x.x. Open that URL from a device on the same Wi-Fi network to browse, download, upload, create folders, and delete SD-card files. - If
UMBC Visitorblocks device-to-device access or requires a captive portal/MAC approval, the ESP32 may connect but the URL may not be reachable from your laptop or phone. In that case, use a phone hotspot or ask UMBC DoIT whether the ESP32 MAC address can be approved.
- Install Arduino libraries:
TFT_eSPI,ArduinoJson, andTJpg_Decoder. - In the Spotify Developer Dashboard, create an app and add this redirect URI exactly:
http://127.0.0.1:8080/callback. - Run
python example_codes/Spotify_Now_Playing_Display/tools/spotify_pkce_helper.py YOUR_SPOTIFY_CLIENT_IDand log in with Spotify. - Copy
example_codes/Spotify_Now_Playing_Display/spotify_config.h.exampletoexample_codes/Spotify_Now_Playing_Display/spotify_config.h. - Paste the generated
SPOTIFY_CLIENT_IDandSPOTIFY_REFRESH_TOKENintospotify_config.h, then set your Wi-Fi values. - Flash
example_codes/Spotify_Now_Playing_Display/Spotify_Now_Playing_Display.ino. - The sketch uses
SD.begin(5)to cache the current album art at/spotify_art.jpg; if SD init fails, the song text still works but album art shows a placeholder. - Spotify may rotate refresh tokens. The sketch saves any rotated refresh token in ESP32 flash so it survives restarts. If you need to force a new token from
spotify_config.h, setSPOTIFY_RESET_SAVED_REFRESH_TOKENtotrue, upload once, then set it back tofalse. - This example is for a personal display project. It reads currently playing Spotify metadata over Wi-Fi and does not use Bluetooth audio or playback controls.
- On Arduino IDE, install the `TFT_eSPI" library.
- The Board uses the "ILI9488 Driver".
- You need to edit the
User_Setup.hto configure the library to this board. - Do this by either uncommenting the following lines or just copy pasting this text on the file.
- Use these settings in the
User_Setup.hfile of theTFT_eSPIlibrary:
#define ILI9488_DRIVER
#define TFT_WIDTH 480
#define TFT_HEIGHT 320
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS 15
#define TFT_DC 2
#define TFT_RST -1
#define TFT_BL 27
#define TFT_BACKLIGHT_ON HIGH
#define TFT_RGB_ORDER TFT_BGR
#define TFT_INVERSION_OFF
#define SPI_FREQUENCY 55000000
#define SPI_READ_FREQUENCY 20000000
#define SPI_TOUCH_FREQUENCY 2500000
// Optional: Touch support
#define TOUCH_CS 33
#define TOUCH_CLK 14
#define TOUCH_MOSI 13
#define TOUCH_MISO 12
#define TOUCH_IRQ 36
// Load fonts
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF
#define SMOOTH_FONT
