Skip to content

Implement hardware factory reset using a button on GPIO7 #18

@Ludovich88

Description

@Ludovich88

Device: Altruist URBAN
MCU: ESP32-C6-WROOM-1
GPIO: 7 (input, pulled up to 3.3V when not pressed, shorted to GND when pressed)

Current state:
GPIO7 is unused in the firmware; the button has no effect. There is no way to reset user settings without re-flashing.

Goal:
Add a feature to reset all user settings to factory defaults when the button is pressed during power-on.

Requirements:

  1. At power-on, check GPIO7 level:
    • Low (0, button pressed) → perform a software reset to defaults, then restart the device (esp_restart()).
    • High (1, button not pressed) → normal boot.
  2. Reset must be reliable: handle contact bounce (add delay, re-read).
  3. Reset must erase all non-volatile user data (Wi-Fi credentials, peripheral configuration, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions