Test an accessible OLED menu
Change contrast, text size, sound, and brightness in an ESP32 menu and compare each stored setting with its visible or audible effect.

UX Uma: I want you to test what each preference actually changes and record where the visible result falls short of its label.
Predict the reading, then compare it with the measurement.
Wokwi ESP32
Third party ToolOpen the ESP32 editor, paste diagram.json, then paste sketch.ino.
Open Wokwi to paste in the files (new tab)Get the files
Use both prepared files. This is a paste-in setup; saving a project requires a Wokwi account.
sketch.ino
- Use the launch button above to open the ESP32 editor in Wokwi.
- Select the editor’s diagram.json tab and replace all its text with the supplied diagram.json.
- Select the sketch.ino tab, replace all its text with the supplied sketch.ino, then click Start Simulation.
Steps
Step 1
- Do
- Paste the diagram and sketch into Wokwi ESP32. Install Adafruit GFX Library and Adafruit SSD1306. Inspect the OLED and button wiring.
- You will see
- Input: inspect the running Wokwi OLED and four button paths. The OLED uses I2C address 0x3C on GPIO 21/22. The four active-low controls use GPIO 25/26/27/14; buzzer uses GPIO 13. The OLED home screen and startup settings are visible together.
- Why it matters
- The buttons, display, and buzzer form the feedback paths. Their named pins match the supplied sketch and diagram. Serial Monitor begins with High Contrast OFF and Large Text OFF. This is a simulator wiring check, not a physical usability test.

Step 1 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 2
- Do
- In Wokwi Serial Monitor, read the startup settings, then press the SELECT button in the Simulation panel.
- You will see
- Input: start at 115200 baud and press SELECT after the home screen appears. Observed in Serial Monitor: "BTN: SELECT pressed". Observed on the real OLED: MENU with Home, Settings, and System Info. Expected: SELECT opens the main menu with Home highlighted.
- Why it matters
- The Wokwi OLED and serial event were captured in the same run. The startup settings remained High Contrast OFF and Large Text OFF. The menu exposes Settings for the next action. This is the simulator display, not a physical accessibility test.

Step 2 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 3
- Do
- In the Simulation panel, press DOWN to Settings, SELECT to open it, then SELECT to toggle High Contrast.
- You will see
- Input: press DOWN, SELECT, and SELECT with each button released between taps. Observed: "High Contrast: ON" and "Settings saved to NVS". Observed on the real OLED: ACCESSIBILITY with High Contrast [ON]. Expected: the contrast setting changes from OFF to ON.
- Why it matters
- The Serial Monitor confirms the toggle action. The OLED shows the selected setting in reversed light and dark areas. The setting was persisted in simulated NVS. Readability still needs a human check on the actual display.

Step 3 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- Tap DOWN to Large Text and SELECT, then use BACK to inspect the main menu.
- You will see
- Input: press DOWN, SELECT, then BACK on the real Wokwi buttons. Serial Monitor: "Large Text: ON" followed by "BTN: BACK pressed". OLED: MENU shows enlarged Home, Settings, and System Info entries. Observed issue: the bottom entry crowds the navigation hint.
- Why it matters
- The serial line confirms the preference changed in this run. The OLED confirms BACK returned to the larger main menu. The crowded bottom entry is visible in the new capture. The preference therefore needs layout review on each screen.

Step 4 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 5
- Do
- In the Simulation panel, navigate to Sound in the Accessibility menu, toggle it OFF, and inspect Serial Monitor.
- You will see
- Input: navigate to Sound and press SELECT. Observed: "Settings saved to NVS" followed by "Sound: OFF". Expected: the sound setting changes from ON to OFF. The marked serial line matches the real Wokwi screenshot.
- Why it matters
- The output confirms the setting was stored. This run produced the disabled-sound confirmation. The later menu position was not independently verified. A serial setting does not measure acoustic output.

Step 5 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- On the OLED menu, select Brightness repeatedly and compare the printed values with the display.
- You will see
- Input: press SELECT four times on Brightness in the OLED menu. Serial Monitor: "Brightness: 25%", then "Brightness: 50%". Serial Monitor: "Brightness: 75%", then "Brightness: 100%". OLED: Brightness ends at [100%] in the real Wokwi capture.
- Why it matters
- Each press saved a new percentage in this run. The final OLED label agrees with the final serial line. The displayed percentages describe settings, not measured luminance. A visual check is needed before treating four labels as four distinct light levels.

Step 6 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab) Step 7
- Do
- On the OLED menu, restore High Contrast OFF, Large Text OFF, Sound ON, and Brightness 100%; return to the home screen.
- You will see
- Input: select High Contrast OFF, Large Text OFF, and Sound ON; press BACK twice. Serial Monitor: "High Contrast: OFF" and "Large Text: OFF". Serial Monitor: "Sound: ON" followed by two "BTN: BACK pressed" lines. OLED: the home screen again shows IoT Device and Status: ONLINE in small text.
- Why it matters
- The capture shows the returned home screen after restoring the settings. Brightness remained at 100% from the previous step. The serial lines confirm the three other restored values. This run does not establish whether NVS survives a new browser project.

Step 7 · Wokwi ESP32; numbered callout added to a real capture. Enlarge screenshot (new tab)
Chapter checks
These questions refer to the chapter’s examples. Use the return links to review their answers.
You're designing a dashboard for a factory floor monitoring system. The operator needs to see: (1) machine status (running/stopped/error), (2) production count, (3) temperature readings, and (4) 7-day production trends. Where should you place the machine status indicator?
Return to the chapter’s knowledge checkA smart building dashboard monitors HVAC systems. Temperature thresholds are set to: Normal (18-24 C), Warning (15-18 or 24-28 C), Critical (<15 or >28 C). During testing, operators complain about 'alert fatigue' - too many warnings. Analysis shows 85% of warnings occur briefly during HVAC startup. What's the BEST solution?
Return to the chapter’s knowledge check