Skip to main content
The ESP32 has a neat feature that lets it wake from Deep sleep when it detects a tap. This is perfect for our use case because it means we can keep the device in sleep mode most of the time, and only wake it up when someone wants to chat.

What it does

When TOUCH_MODE is enabled:
  • A short tap schedules the device to start listening (it sets scheduleListeningRestart = true).
  • A long press puts the device into deep sleep (it sets sleepRequested = true).

Enable Tap to Chat

In Config.h:
If TOUCH_MODE is disabled, Elato uses the button wake-up path (esp_sleep_enable_ext0_wakeup) instead.

Touch behavior (from touchTask)

  • Touch pad: TOUCH_PAD_NUM2
  • Tap debounce: TOUCH_DEBOUNCE_DELAY = 500ms
  • Long press duration: 500ms
The firmware compares the touch reading to:

Sleep + wake behavior

When going to sleep (enterSleep()), the firmware:
  • Stops I2S input/output
  • Disconnects the WebSocket cleanly
  • Uninstalls I2S drivers
  • Enables touch wakeup using:
Then it calls esp_deep_sleep_start().

Check your Touch threshold with touch_test.cpp