Where I’m Stuck
I’ve followed the steps below to connect my ESP32-2432S028 TFT display to https://display.regardingwork.com, but I’m stuck. The ESP32’s LED turns on briefly during upload but turns off, and the TFT remains blank. I think it’s due to two issues:
- TFT Configuration: The
user_setup.hfile might have incorrect pin assignments or driver settings for my ILI9341-based 2.4-inch TFT. - Power Supply: The TFT’s 310mA max draw might require external power via a powered USB hub with an AC adapter (5V/2A), which I haven’t fully set up yet due to a missing adapter.
For initial setup, see the ESP32 Setup Guide.
Introduction
This guide outlines how to connect your ESP32-2432S028 TFT display to https://display.regardingwork.com for displaying data from APIs (e.g., RegardingWork game, CoinGecko, OpenWeatherMap). It builds on the initial ESP32 setup from the ESP32 Setup Guide.
Step 1: Verify Hardware Compatibility
Ensure your ESP32-2432S028 with TFT supports the required features:
- Screen Resolution: 240x320 (ILI9341-based).
- Connectivity: WiFi (802.11 b/g/n).
- Memory: 4MB flash, 520KB SRAM (sufficient for firmware and web client).
Confirm with the Shopee specs: 240MHz dual-core, SPI interface.
Step 2: Set Up the Display
Prepare the display for operation.
-
Initial Power-On: Connect to a 5V power source (USB-C or external 5V/GND pins) and test. Use Arduino IDE as per ESP32 Setup Guide.
-
Network Connection: Configure WiFi in the sketch:
const char* ssid = "yourSSID"; const char* password = "yourPassword"; WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) delay(1000); -
Firmware Update: Flash with a basic HTTP client if not preloaded. Use the sketch below (adjust for TFT).
Step 3: Register the Display with the System
Link the display to the web platform.
- Log in to https://display.regardingwork.com.
- Navigate to device management, register using the ESP32’s MAC address ( obtainable via
WiFi.macAddress()in sketch) or a generated UUID. - Note the endpoint URL (e.g., /device/{device_id}/data).
Step 4: Configure API Connections
Set up widgets in the web dashboard.
- Add widgets for RegardingWork game API, CoinGecko, OpenWeatherMap.
- Set update frequency (e.g., 1 minute).
- Test data flow; add custom API keys (e.g., Stripe) if needed.
Step 5: Program the Display to Fetch Data
Update firmware to fetch and display data.
#include
#include
#include
#include
TFT_eSPI tft = TFT_eSPI();
const char* ssid = "yourSSID";
const char* password = "yourPassword";
const char* url = "https://display.regardingwork.com/device/yourDeviceId/data";
void setup() {
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(1000);
tft.init();
tft.setTextColor(TFT_WHITE);
}
void loop() {
if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
http.begin(url);
int httpCode = http.GET();
if (httpCode == 200) {
String payload = http.getString();
DynamicJsonDocument doc(1024);
deserializeJson(doc, payload);
String content = doc["widgets"][0]["content"].as();
tft.fillScreen(TFT_BLACK);
tft.setCursor(0, 0);
tft.println(content);
}
http.end();
}
delay(60000); // Update every minute
}
Adjust for your user_setup.h from ESP32 Setup Guide.
Step 6: Test and Debug
Verify functionality.
- Power on and check WiFi connection and data fetch via Serial Monitor (115200 baud).
- For HTTPS issues, ensure TLS support (ESP32 handles this); test with HTTP temporarily.
- Confirm device status on the web app.
Step 7: Enhance and Scale
Improve the setup.
- Add widgets (e.g., charts) and render PNGs if supported.
- Register multiple displays and sync via group settings.
- Consider a battery pack for backup power.
Conclusion
This guide builds on the ESP32 Setup Guide. Address power and config issues to resolve the stuck point.