Start / hold / menu select — INPUT_PULLUP, active low
GPIO4
BTN B
Stop / 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
Mode 1 · Target time
Two-Button Game Console — ESP32-C3 Super Mini
Doc TBGC-01 · Rev A · Sheet 3 / 4
02
Program flowchart · continued
Mode 2 · Reaction timer
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
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.
The screen shows the target, 10.00 s. Press A to start.
The clock counts up for 3 seconds, then blanks. A slow pulsing … tells you it is still running.
Count it out in your head. Press B when you believe 10.00 s has passed.
You get your real time, how far off you were, and a rating.
Ratings
PERFECT
within 50 ms of the target
GREAT
within 150 ms
OK
within 400 ms
MISS
further 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.
Hold A down to arm the round, and keep holding it.
After a random wait of 2 to 5 seconds, the screen flips to white and reads PRESS B!
Hit B the instant you see it.
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 ms
typical for an alert adult
Under 200 ms
quick
Under 150 ms
near the human limit
Your best score is kept when the power is switched off.