Documentation
Onboarding
Getting Started
Power & Battery
Hardware & Components
Build & Assembly
Radio & RF Design
Frequencies & Regulations
Firmware & Software
USB & Connectivity
GPS & Navigation
Morse & Communication
Modes & Operation
Field Operations & Rescue
Building Effectively
Build Variants
Project & Reference
Docs Build & Assembly Button System Details

Button System Details

Edit on GitHub

Debounce, hold detection, auto-repeat and the timing constants behind every press

Button System Details

Overview

Four buttons drive the whole device. Their behavior - short vs long press, auto-repeat, save-on-hold - is defined by a set of timing constants worth knowing when debugging.

Button Mapping

ButtonGPIOInput type
SW_MODE33INPUT_PULLUP (internal)
SW_SEL32INPUT_PULLUP (internal)
SW_UP35Input-only, external 10k pull-up
SW_DN34Input-only, external 10k pull-up

Timing Constants

ConstantValueMeaning
BTN_DEBOUNCE_MS50Debounce window
BTN_LONG_MODE_MS2000MODE long press (EMERGENCY)
BTN_LONG_CFG_MS3000SEL long press (CONFIG)
BTN_FACTORY_MS5000MODE+SEL at boot (reset)
BTN_REPEAT_DELAY_MS500Delay before auto-repeat
BTN_REPEAT_RATE_MS150Auto-repeat interval

Press Actions

PressAction
MODE shortToggle BEACON/SEARCH
MODE long (2 s)EMERGENCY
SEL shortToggle VOL/WPM target
SEL hold (1 s)Save VOL/WPM to NVS
SEL long (3 s)CONFIG mode
UP/DN shortAdjust selected value
UP/DN holdAuto-repeat

Wiring Caution

GPIO 34 and 35 are input-only with no internal pull-ups. Without the external 10k pull-up to 3.3 V, the buttons float and presses are unreliable or stuck.