ESP32 Wireless Display Dashboard / Stage 3 of 3
Fresh/stale visualization
Mark values stale five seconds after the last accepted message.
Firmware source authored · compile not attempted in this pass
Download stage 3 PlatformIO projectRead code & run steps ↓
What changes now?
Mark values stale five seconds after the last accepted message.
Expected after hardware review: A bar reflects the last accepted value while status distinguishes freshness.
Builds on stage 2: Validated incoming value.
What you need
Check availability and exact module markings before starting.
Connections / current hardware gate
Before connecting power. Confirm the classic ESP32 target and SSD1309 carrier supply/pull-ups. The local access-point example does not establish campus-network access or deployment readiness.
- Review the OLED module, address and electrical interface before power.
- Use the actual address printed by the authored local access-point program after qualification.
- Keep incoming values bounded and preserve invalid-payload and stale-data behavior.
Conditional connection table and full module facts
Electrical review is incomplete. Conditional references require confirmation; unresolved pins or rails are not wiring instructions. Power off before changing connections.
| From device / pin | To device / pin | Signal / voltage | Connection status and notes |
|---|---|---|---|
2.42-inch SSD1309 128×64 OLED Display Module (I²C)SDA | ELEGOO ESP-WROOM-32 development boardGPIO21 | I2C SDA 3.3 V | Conditional reference Carrier supply/address and pull-up rail need confirmation; catalog establishes SSD1309 family only. |
2.42-inch SSD1309 128×64 OLED Display Module (I²C)SCL | ELEGOO ESP-WROOM-32 development boardGPIO22 | I2C SCL 3.3 V | Conditional reference Use labeled GPIOs on classic ESP32; not the C6 onboard map. |
display/peripheralGND | controllerGND | Signal reference 0 V | Conditional reference Unpowered wiring check; use correct common-ground topology and keep high-current panel returns out of thin signal paths. |
display/peripheralVCC | verified supplyPin unresolved | Peripheral power Voltage unresolved | Conditional reference Supply voltage/current unknown at carrier level until reviewed; no assumed 5 V or 3.3 V instruction. |
Access describes the source of a requirement. Check availability, the exact revision and the complete power/driver/harness system before starting. Inventory quantities are expected purchase/BOM quantities, not live stock.
controller verified · preflight required
Compatibility and unresolved details
- Controller: SSD1309
- Resolution: 128 × 64
- Diagonal: 2.42 inches
- Interface: I²C, four-pin version
- Emission color: Variant-dependent / not tracked; requested yellow
- Carrier voltage/address: Not established; verify actual module
- ELEGOO ESP-WROOM-32 development boardClub-owned
product family verified · preflight required
Compatibility and unresolved details
- Headers/USB bridge: Exact carrier count and bridge unverified
Use this complete project
Target: esp32dev · Environment: checkpoint3 · Stage branch: DISPLAY_STAGE=3
- Open the complete project. Download the stage ZIP, extract it and open the folder containing
platformio.iniandsrcin VS Code. Keep its supporting headers and libraries together. - Build stage 3. Select
checkpoint3in PlatformIO Project Tasks → General → Build, or use a PlatformIO terminal:
A successful Build compiles the program; it does not upload it or approve electrical connections.pio run -e checkpoint3 - Stop at the hardware gate. The supplied electrical-review flag remains false. Have a qualified reviewer complete the actual module, wiring and power checks before using an approved configuration for hardware operation.
As supplied, Serial at 115200 baud reports
STOP: complete wiring/power review in guide before enabling hardware.and initialization stops.
After electrical review: Upload and Monitor
Only with the actual setup reviewed and the configuration explicitly approved, choose this stage's Upload task. Close any monitor using the board first.
pio run -e checkpoint3 -t uploadOpen the matching Monitor at 115200 baud, then compare the expected result with what actually happens.
pio device monitor -b 115200Record Build, Upload and physical observations separately.
Complete source
The viewer starts at src/main.cpp. Use Source file for the board profile, PlatformIO configuration and supporting code. Keep the complete ZIP together.
workspaces/esp32-wireless-dashboard/src/main.cpp
#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>
#include <DisplayCore.h>
#include "board_profile.h"
U8G2_SSD1309_128X64_NONAME2_F_HW_I2C oled(U8G2_R0,U8X8_PIN_NONE,22,21);
bool ready=false;uint32_t lastUpdate=0;
#include "network.h"
void setup(){Serial.begin(115200); if(!kElectricalReviewComplete){Serial.println("STOP: complete wiring/power review in guide before enabling hardware.");return;}Wire.begin(21,22);oled.setI2CAddress(kOledAddress7<<1);oled.begin();oled.setFont(u8g2_font_6x10_tf);beginNetwork();ready=true;}
void loop(){if(!ready)return;pollNetwork();uint32_t now=millis();if(!displaylab::elapsed(now,lastUpdate,250))return;lastUpdate=now;oled.clearBuffer();oled.drawStr(0,10,"Local HTTP dashboard");oled.setCursor(0,28);
#if DISPLAY_STAGE == 1
oled.print("AP: see Serial IP");
#else
oled.print(networkFresh(now)?"Fresh ":"Stale ");oled.print(networkValue());
#endif
#if DISPLAY_STAGE >= 3
oled.drawFrame(0,40,128,12);oled.drawBox(1,41,networkValue()*126/1000,10);
#endif
oled.sendBuffer();}
Source integrity · SHA-256
4d7e0807d07a156c5c9e7f30607df6e4e8533e3a755edb2f94d580f43035eea2Raw downloads and standalone ZIPs retain the canonical bytes and supporting files. Copy follows the selected Comments setting.
Check the result
A bar reflects the last accepted value while status distinguishes freshness.
As supplied, the false electrical-review flag prevents this hardware result. After qualified review, record what actually happens; the text above is an expected result, not a bench transcript.
Original verification checklist
- Build the exact selected environment; distinguish dependency resolution from source compilation.
- Observe the stated output and record actual behavior; expected result is not an observed transcript.
- Test the named failure mode before proceeding.
Troubleshooting
Client cannot reach endpoint
Confirm it joined the ESP32 AP, use the printed local IP and inspect the request method/path. Mobile devices may try to leave a network without Internet.
400 or 413 response
Check JSON type/range/length. Quoted numbers and oversized bodies are intentionally rejected rather than coerced.
Display says stale
Send an accepted update and then intentionally stop. Distinguish absence of recent valid data from a broken OLED.
Technical explanation / original guide
Read the complete original stage guide
Original source/research wording is preserved. The stage's dated build evidence above supersedes earlier blanket compile-status wording; no physical results are implied.
Build it
Mark values stale five seconds after the last accepted message.
Open workspaces/esp32-wireless-dashboard in VS Code/PlatformIO. Select checkpoint3 and run pio run -e checkpoint3. This is FIRMWARE_SOURCE_AUTHORED with embedded compilation unverified. Review the electrical flag and canonical conditional wiring before any upload.
Understand it
network.cpp owns connectivity and server state. The handler rejects body lengths above sixty-four characters and parses into a bounded StaticJsonDocument. It accepts only an unsigned integer field in the specified range. Invalid requests do not refresh the last-success timestamp. The display continues to show the last value with a stale label after five seconds. The polling loop avoids an endless connection wait, but the synchronous WebServer library can still spend time handling clients; this baseline is not a hard-real-time or fully asynchronous guarantee.
Source review precision: All environments start the AP and accept the bounded /sample POST. Checkpoint1 draws the AP diagnostic; checkpoint2 draws value/freshness; checkpoint3 adds the bar. Five seconds after the last accepted message the value is stale. AP readiness alone does not prove a valid sample.
Expected result and verification
A bar reflects the last accepted value while status distinguishes freshness.
This is expected after a correct build and electrical review, not a captured bench transcript.
Check the selected source branch and named failure conditions. Record actual build or software output separately from future physical observations.
Likely failures
Client cannot reach endpoint: Confirm it joined the ESP32 AP, use the printed local IP and inspect the request method/path. Mobile devices may try to leave a network without Internet.
400 or 413 response: Check JSON type/range/length. Quoted numbers and oversized bodies are intentionally rejected rather than coerced.
Display says stale: Send an accepted update and then intentionally stop. Distinguish absence of recent valid data from a broken OLED.
Build evidence, target and remaining verification
Original status: unverified.
No successful build for this stage is recorded in the dated embedded compile ledger.
No compile was attempted in this pass under the user's testing limit. Upload and physical bench observation remain untested.
espressif32@6.12.0 · arduino
Diagnostics before integration
- OLED border/corner profile fixture Environment: checkpoint1