Installable skillMIT

Esp32

An MCP server that provides on-demand skill loading for AI coding assistants.

BY modbenderUPDATED Oct 30, 2026
INTENDED FORβ—ˆOpenClawInstall in a listed agent.

instructions.md

---
name: esp32-35caf2de9f80
description: Avoid common ESP32 mistakes β€” GPIO conflicts, WiFi+ADC2 trap, deep sleep gotchas, and FreeRTOS pitfalls.
metadata: {"clawdbot":{"emoji":"πŸ“Ÿ","os":["linux","darwin","win32"]}}
---

## 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_ATTR` for persistent variables β€” regular RAM lost in deep sleep
- `esp_sleep_enable_ext0_wakeup()` for single pin β€” `ext1` for multiple pins
- WiFi reconnect takes 1-3 seconds after wake β€” plan for this delay

## WiFi Gotchas
- Call `WiFi.mode()` before `WiFi.begin()` β€” mode affects behavior
- `WiFi.setAutoReconnect(true)` doesn't always work β€” implement reconnect in loop
- Event-driven with `WiFi.onEvent()` more reliable β€” don't poll `WiFi.status()`
- Static IP faster than DHCP β€” saves 2-5 seconds on connect

## FreeRTOS
- Default stack too small for printf/WiFi β€” use 4096+ for complex tasks
- Task watchdog triggers at 5s default β€” call `vTaskDelay()` or feed watchdog
- `xTaskCreatePinnedToCore()` for core affinity β€” WiFi on core 0, your code on core 1
- `delay()` yields to scheduler β€” `vTaskDelay(pdMS_TO_TICKS(ms))` in tasks

## Memory
- Heap fragments over time β€” preallocate buffers, avoid repeated malloc/free
- `ESP.getFreeHeap()` for monitoring β€” log periodically in long-running apps
- PSRAM available on some boards β€” `heap_caps_malloc(size, MALLOC_CAP_SPIRAM)`
- String concatenation fragments heap β€” use `reserve()` or char arrays

## Peripherals
- No native `analogWrite()` β€” use LEDC: `ledcSetup()`, `ledcAttachPin()`, `ledcWrite()`
- I2C needs external pullups usually β€” internal pullups too weak for fast speeds
- SPI CS pin must be managed β€” `SPI.begin()` doesn't auto-configure
- UART0 is Serial/USB β€” use UART1/2 for external devices

## OTA Updates
- Needs two OTA partitions β€” default partition scheme may have only one
- Check `ESP.getFreeSketchSpace()` β€” OTA fails silently if not enough space
- `ArduinoOTA` blocks during update β€” handle in loop, not in time-critical code

## Power
- Brown-out detector resets at ~2.4V β€” `esp_brownout_disable()` if using battery
- WiFi TX uses 300mA peaks β€” power supply must handle spikes
- Deep sleep ~10Β΅A β€” but RTC peripherals add more if enabled
COMPATIBILITY & REFERENCES

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.