Loading...
Loading...
Operate a Seeed XIAO ESP32S3 board with arduino-cli on Windows: install the core, compile, upload, read serial output, and run verified examples (blink, serial, touch, ADC, PWM, WiFi scan/AP, BLE, deep sleep). Use this skill WHENEVER the task involves an ESP32S3 / XIAO board, arduino-cli, flashing a sketch, reading the serial monitor, COM ports, or any embedded/Arduino work — even for a "simple" LED change. It contains verified commands and known pitfalls (DTR reset, deep-sleep USB drop, PSRAM flag) that prevent wasted debugging time.
npx skill4agent add shain1912/esp32-skills xiao-esp32s3<PORT><SKETCH_DIR>arduino-cli version # confirm arduino-cli exists
arduino-cli core list # is esp32:esp32 3.x installed?
# if not (this downloads ~1 GB and can take several minutes — use a long timeout):
arduino-cli core update-index
arduino-cli core install esp32:esp32arduino-cli board listCOM4<PORT># sketch layout rule: folder name and .ino name must match: my_sketch\my_sketch.ino
# compile (first compile of a session takes 1-3 min; cached after)
arduino-cli compile --fqbn esp32:esp32:XIAO_ESP32S3 <SKETCH_DIR>
# upload
arduino-cli upload -p <PORT> --fqbn esp32:esp32:XIAO_ESP32S3 <SKETCH_DIR>
# read serial for 10 s (NEVER `arduino-cli monitor` — it blocks forever)
powershell -File scripts\read_serial.ps1 -Port <PORT> -Seconds 10
# optional: send a line to the board and read the response
powershell -File scripts\read_serial.ps1 -Port <PORT> -Seconds 10 -Send "hello"&&;if ($?) { ... }assets/sketches/references/examples.mdSerial.begin(115200);delay(3000);LED_BUILTINLOWHIGHanalogWrite(LED_BUILTIN, 0)analogReadResolution(12)analogRead(A0)analogReadMilliVolts(A0)touchRead(T2)WiFi.macAddress()00:00:00:00:00:00WiFi.mode(WIFI_STA)NetworkClientNetworkServerWiFiClientWiFiServer| Label | GPIO | Notes |
|---|---|---|
| D0 | 1 | A0, touch T1 |
| D1 | 2 | A1, touch T2 |
| D2 | 3 | A2, touch T3 |
| D3 | 4 | A3, touch T4 |
| D4 | 5 | SDA, touch T5 |
| D5 | 6 | SCL, touch T6 |
| D6 | 43 | UART TX (Serial1) |
| D7 | 44 | UART RX (Serial1) |
| D8 | 7 | SPI SCK |
| D9 | 8 | SPI MISO |
| D10 | 9 | SPI MOSI |
| user LED | 21 | inverted (LOW = on) |
rst:0x15 USB_UART_CHIP_RESETRTC_DATA_ATTRscripts\watch_port.ps1 -Port <PORT>arduino-cli monitorscripts\read_serial.ps1--board-options PSRAM=opinetsh wlan show networksESP-ROM:esp32s3-...arduino-cli upload--clean<project>_inferencingobjs.a ... is not an object--cleanwatch_port.ps1