Schematic, program flowchart and build notes for the ESP32-C3 build. Download the sketch (.ino)
ESP32-C3 Super Mini · SSD1306 · 2× NO Pushbutton

Two-Button Game Console

Doc TBGC-01 · Rev A
Sheet 1 / 4
01

Connection schematic

SSD1306 OLED · I2C 128 × 64 addr 0x3C VCC GND SCL SDA ESP32-C3 Super Mini USB-C · 3.3 V logic 3V3 GND GPIO7 / SCL GPIO6 / SDA GPIO3 GPIO4 GND 3V3 GND SCL SDA BTN A — START / SELECT BTN B — STOP / ENTER GND NOTE — Buttons are NO momentary, wired to GND. Inputs use internal pull-ups (INPUT_PULLUP): idle HIGH, pressed LOW. No external resistors required.
Wire colours
Black GND · common Red 5V · OLED VCC Green stripe GPIO7 · SCL Yellow stripe GPIO6 · SDA Blue GPIO3 · BTN A Purple GPIO4 · BTN B
Pin assignment
ESP32-C3 pinConnects toFunction
3V3OLED VCCDisplay power (3.3 V)
GNDOLED GND · BTN A · BTN BCommon ground
GPIO6OLED SDAI2C data — Wire.begin(6, 7)
GPIO7OLED SCLI2C clock — Wire.begin(6, 7)
GPIO3BTN AStart / hold / menu select — INPUT_PULLUP, active low
GPIO4BTN BStop / react / menu enter — INPUT_PULLUP, active low
Design notes
  • I2C on GPIO6/7 with Wire.begin(6, 7) — matches the board's SDA/SCL silkscreen and keeps strapping pins 2, 8 and 9 untouched.
  • Debounce both buttons in software, ~25 ms.
  • Most SSD1306 modules respond at I2C address 0x3C.
  • Powering over USB-C; OLED draws ~20 mA max — no external supply needed.
Two-Button Game Console — ESP32-C3 Super Mini
Doc TBGC-01 · Rev A · Sheet 2 / 4
02

Program flowchart

Main loop · menu
POWER ON Init I2C (SDA 6 / SCL 7), SSD1306, GPIO 3 & 4 as INPUT_PULLUP Draw menu · highlight selected mode BTN A pressed? YES · toggle mode NO BTN B pressed? NO YES Run selected game mode game exits back to menu
Mode 1 · Target time
Show target: 10.00 s "Press A to start" BTN A pressed? NO YES t0 = millis() · start count-up show clock 3 s, then blank screen BTN B pressed? NO YES t = millis() − t0 Δ = t − 10 000 ms Show Δ (early / late) + rating ANY BUTTON → MENU
Two-Button Game Console — ESP32-C3 Super Mini
Doc TBGC-01 · Rev A · Sheet 3 / 4
02

Program flowchart · continued

Mode 2 · Reaction timer
Show "HOLD A to arm…" BTN A held (LOW)? NO YES Wait random 2000–5000 ms A released early? YES · show FALSE START, restart NO Show "PRESS B!" · t0 = millis() BTN B pressed? NO YES rt = millis() − t0 Show rt in ms + session best ANY BUTTON → MENU
Implementation notes
MENUBTN A cycles the highlight between the two modes; BTN B enters. Poll with debounce (~25 ms) — no interrupts needed.
MODE 1Blanking the clock after 3 s makes it a game of internal timing rather than reading the screen. Skip that step if you prefer a visible stopwatch.
MODE 2The random 2–5 s delay defeats anticipation; the early-release check catches players who let go of A before the prompt.
ESP32-C3 pin reference
ESP32-C3 pinout reference
Two-Button Game Console — ESP32-C3 Super Mini
Doc TBGC-01 · Rev A · Sheet 4 / 4
03

How to play

The controls
Button A — change the highlighted mode in the menu. Inside a game, it starts or arms the round.
Button B — enter the highlighted mode from the menu. Inside a game, it is the one you press to stop or react.
On a result screen, either button returns you to the menu. Power on goes straight to the menu; there is nothing to set up.
Game 1 · Target time
Goal — stop the clock at exactly 10.00 seconds. No peeking: the clock hides itself partway through.
  1. The screen shows the target, 10.00 s. Press A to start.
  2. The clock counts up for 3 seconds, then blanks. A slow pulsing … tells you it is still running.
  3. Count it out in your head. Press B when you believe 10.00 s has passed.
  4. You get your real time, how far off you were, and a rating.
Ratings
PERFECTwithin 50 ms of the target
GREATwithin 150 ms
OKwithin 400 ms
MISSfurther out than 400 ms
EARLY means you stopped short of 10.00 s, LATE means you overshot.
Game 2 · Reaction timer
Goal — press B as fast as you can once the screen tells you to. Your time is shown in milliseconds; lower is better.
  1. Hold A down to arm the round, and keep holding it.
  2. After a random wait of 2 to 5 seconds, the screen flips to white and reads PRESS B!
  3. Hit B the instant you see it.
  4. Your reaction time appears, along with your best score so far.
False starts
The round is voided if you let go of A before the prompt, or press B before the prompt appears. The wait is randomised precisely so it cannot be anticipated — guessing is caught, not rewarded.
What is a good time?
200–250 mstypical for an alert adult
Under 200 msquick
Under 150 msnear the human limit
Your best score is kept when the power is switched off.