Assembled IvoChess Clock v2.0 prototype showing the physical button and speaker wired in

An assembled v2.0 prototype — physical button and speaker wired in alongside the original display, LED, and battery connections.

1. E-paper display

The Waveshare 2.13" HAT connects over SPI, plus two control lines (DC, RST) and one status line (BUSY). It ships with a ribbon cable already attached to the panel and a set of loose jumper wires for the pin header — use those.

Waveshare pinXIAO ESP32C6 pinRole
VCC3V3Power
GNDGNDGround
DIND10SPI data (MOSI)
CLKD8SPI clock (SCK)
CSD9Chip select
DCD4Data/command
RSTD3Reset
BUSYD5Busy status (input)
Waveshare 2.13 inch e-Paper HAT pinout diagram
These pin numbers (D3D5, D8D10) match the firmware's config.h exactly. If you ever want to move the display to different pins, update EPD_CS/EPD_DC/EPD_RST/EPD_BUSY there to match.

2. WS2812 LED strip

An 8-pixel addressable strip, wired as a single data line — only the IN end connects to anything; the OUT end (for chaining more LEDs) is left unconnected.

LED strip pinXIAO ESP32C6 pin
VCC3V3
GNDGND
IND7
OUTnot connected
WS2812B 8-LED strip with labeled pads

The number of LEDs actually driven is configurable in the webadmin software — it doesn't have to match all 8 physically wired pixels.

3. Battery, power switch & voltage sensing

The XIAO ESP32C6 has onboard LiPo charging — solder the battery straight to its B+/B- pads on the underside of the board, with the switch in line on the positive lead only. A small two-resistor voltage divider off the same B+ line is what lets the firmware show a battery percentage at all.

ConnectionGoes to
Battery + (red wire)Switch — terminal 1
Switch — terminal 2XIAO B+ pad
Battery (black wire)XIAO B- pad, directly
The switch sits only on the battery's positive lead, between the battery and the board. USB-C power bypasses it entirely — that's what gives the exact behavior this clock needs: plugged into USB, it's always on regardless of switch position; on battery, the switch fully disconnects it so it can be off.
3.7V LiPo battery with connector

The XIAO ESP32C6 has no built-in battery-sense pin — the firmware reads charge level off D1 through a simple voltage divider you add yourself: two resistors from the battery's positive line down to ground, with the midpoint tapped into D1.

ConnectionGoes to
XIAO B+ padR1 — 100kΩ
R1 other endSense node
Sense nodeR2 — 68kΩGND, and a wire to XIAO D1
100kΩ/68kΩ divides a full 4.2V charge down to about 1.7V at D1 — comfortably under the ESP32's 3.3V ADC limit, so there's no risk of over-volting the pin even with normal resistor tolerance. The pair's raw ratio is 0.405; the firmware's VOLTAGE_DIVIDER_RATIO in config.h is set to 0.395 instead, calibrated against a real multimeter reading on the battery — if you build this yourself, do the same: compare the displayed percentage to an actual voltage reading and nudge that constant if it drifts.
Mini rocker switch
Mini rocker switch panel-mount dimensions, 8.5 by 13.5mm

Panel-mount hole: 8.5 × 13.5mm. It's a simple 2-position on/off switch — if yours has a third pin (some rocker switches share a body with a lit variant), only two of the three are used; a quick continuity check with a multimeter shows which two switch together.

4. Physical button

A new v2.0 addition: a 2-leg momentary switch (normally-open, springs back on release) mounted on top of the clock.

Button legGoes to
Leg 1XIAO D0
Leg 2XIAO GND
Top-mounted momentary push button
No external resistor needed — the firmware uses the microcontroller's internal pull-up resistor. The pin idles HIGH and drops to LOW when pressed, closing the circuit to GND.
Top button panel-mount dimensions

5. Speaker

Another v2.0 addition: a 25mm passive speaker. Passive means it has no built-in amplifier — it can't be wired directly to a microcontroller pin. It needs a simple transistor driver circuit instead.

Extra parts needed: 1x generic NPN transistor (S8050, 2N2222, or any equivalent), 1x 1kΩ resistor (transistor base), 1x 10kΩ resistor (pulldown, optional but recommended).

XIAO D2 ----[1kΩ resistor]---- Transistor base (NPN)
                                Transistor emitter ---- GND
                                Transistor collector ---- Speaker "-" (black wire)

XIAO 3V3 ------------------------------------------------ Speaker "+" (red wire)

XIAO D2 ----[10kΩ resistor]---- GND   (pulldown - prevents an audible
                                        "click" at boot before the firmware
                                        configures the pin - optional,
                                        recommended)
25mm passive speaker
The 1kΩ base resistor limits current to a few mA — enough to saturate the transistor and drive the speaker safely. No flyback diode needed (that's only for inductive loads like relays or motors, not a small speaker at this power level). Sound is generated as a PWM square wave from the microcontroller pin; the transistor only amplifies the current.
25mm passive speaker dimensions

v2.0 pin summary

The two new v2.0 connections, at a glance. Neither pin conflicts with the existing v1 wiring (display SPI, LEDs, and battery sensing all use different pins).

ComponentXIAO pinGPIO
Physical buttonD0GPIO0
Speaker driver (PWM)D2GPIO2

Tips