Skip to content

Wiring — Wi-Fi bedside button (ESP32)

The bedside stop button is an ESP32 board (Heltec WiFi Kit 32 V1) that calls the clock over Wi-Fi. Nothing has to be wired: the button and the screen are on the board. You only power it.

Function Where Pin
Stop button PRG push-button GPIO0 (pressed = low, internal pull-up)
Screen (SSD1306 128 × 64) on board, I²C SDA GPIO4 · SCL GPIO15 · RST GPIO16
Reset RST push-button not usable by the application
Power and flashing micro-USB 5 V
5 V USB sourcecharger or computerHeltec WiFi Kit 32 V1PRG + OLED on boardUSBmicro-USBUSB cable
USB
Power: any 5 V USB source. The same cable flashes the firmware.

Set ROBINE_WIFI_SSID, ROBINE_WIFI_PASSPHRASE and, once paired, REMOTE_BUTTON_ID and REMOTE_BUTTON_SECRET_HEX in .env, then:

Terminal window
make button-build
make button-upload PORT=/dev/ttyUSB0
make button-monitor PORT=/dev/ttyUSB0

To press something larger than PRG (for example through the enclosure), wire a normally-open push-button in parallel with PRG: between GPIO0 and GND. No resistor is needed, the firmware enables the internal pull-up.

Push-buttonnormally openHeltec WiFi Kit 32 V1headercontact 1contact 2GPIO0GNDto GPIO0to GND
SignalGround
Check that GPIO0 and GND are broken out on your board's header. Do not hold the button while powering up: GPIO0 low at reset puts the ESP32 in download mode.

To use another pin, change STOP_BUTTON_PIN in hardware/remote_button/platformio.ini. The screen pins are fixed in the firmware for the Heltec V1; another ESP32 board needs a code change.

A radio version of the button (Arduino Pro Mini 3.3 V + RFM95) is described in the remote button note. The wiring of the receiver on the Pi is in Wiring — Raspberry Pi 3; the button-side wiring is not documented yet.