ESP32
Installation
SKILL.md
GPIO Restrictions
- Strapping pins boot behavior — GPIO0, GPIO2, GPIO12, GPIO15 affect boot mode
- GPIO6-11 connected to flash — don't use, crashes immediately
- GPIO34-39 input only — no output, no pullup/pulldown
- ADC2 unusable with WiFi active — use ADC1 (GPIOs 32-39) when WiFi enabled
Deep Sleep
- Only RTC GPIOs for wakeup — GPIO0, 2, 4, 12-15, 25-27, 32-39
RTC_DATA_ATTRfor persistent variables — regular RAM lost in deep sleepesp_sleep_enable_ext0_wakeup()for single pin —ext1for multiple pins- WiFi reconnect takes 1-3 seconds after wake — plan for this delay
WiFi Gotchas
- Call
WiFi.mode()beforeWiFi.begin()— mode affects behavior WiFi.setAutoReconnect(true)doesn't always work — implement reconnect in loop- Event-driven with
WiFi.onEvent()more reliable — don't pollWiFi.status() - Static IP faster than DHCP — saves 2-5 seconds on connect