h1d avatar

Esp32 Serial Commands

If you're testing ESP32 firmware and tired of physically pressing buttons, this sends commands over USB serial to trigger actions programmatically. You add a simple command parser to your device code (works with ESP-IDF or Arduino), then echo commands from your terminal to simulate button presses, screen changes, or whatever you wire up. The skill includes actual device-side code and bash scripts for stress testing, like sending 100 presses in a loop or running hour-long stability tests. It's straightforward automation that beats reflashing or physical interaction when you're debugging. The approach is basic but that's the point, it just works without extra dependencies.

skills.sh installs
287
GitHub stars
11
last updated
Aug 21, 2026

Install

$ npx -y skills add h1d/agent-skills-esp32 --skill esp32-serial-commands --agent claude-code

Installs into .claude/skills of the current project.

Files

ESP32 Serial Command Emulation

Overview

Send commands directly to the serial port to emulate button presses and user actions. Works over USB serial.

ESP32 Setup (Device Side)

ESP-IDF Framework

#include "esp_log.h"
#include <string.h>

static const char* TAG = "SerialCmd";

void serial_command_task(void* arg) {
    char buf[64];
    int idx = 0;

    while (1) {
        int c = getchar();
        if (c == EOF) {
            vTaskDelay(pdMS_TO_TICKS(10));
            continue;
        }

        if (c == '\n' || c == '\r') {
            buf[idx] = '\0';
            if (idx > 0) {
                ESP_LOGI(TAG, "Command: %s", buf);

                if (strcmp(buf, "PRESS") == 0) {
                    button_callback();
                } else if (strncmp(buf, "SCREEN:", 7) == 0) {
                    int screen = atoi(buf + 7);
                    go_to_screen(screen);
                }
            }
            idx = 0;
        } else if (idx < sizeof(buf) - 1) {
            buf[idx++] = c;
        }
    }
}

// In app_main():
// xTaskCreate(serial_command_task, "serial_cmd", 2048, NULL, 5, NULL);

Arduino Framework

Sponsors

Details

Repository
github.com/h1d/agent-skills-esp32
Categories
Testing & QA, AI & Agent Building, Debugging, Automation & Workflows, Design & UI/UX
First seen
Jun 3, 2026
1gramiojs avatargramiogramiojs/documentationInvoke for ANY Telegram bot code — `gramio`/`@gramio/*` imports, `new Bot()`, `bot.command`/`bot.callbackQuery`/`bot.on`/`bot.updates.on`, scenes/FSM, inline & 286skills.sh installs
2feiskyer avatarautonomous-skillfeiskyer/claude-code-settingsExecute long-running, multi-session tasks autonomously using Claude Code headless mode or in-session hook-based loops. Supports structured task decomposition (f284skills.sh installs
3postplusai avataredit-enhancement-packagerpostplusai/postplus-skillsPackage beat-level edit enhancement instructions from a B-roll plan, subtitle chunks, and optional style context. Use this when the goal is to turn B-roll match282skills.sh installs
4patricio0312rev avatarquality-gates-enforcerpatricio0312rev/skillsEnforces minimum quality thresholds in CI including code coverage, linting, type checking, and security scanning. Provides required checks, PR rules, and automa280skills.sh installs
5ulpi-io avatarbrowseulpi-io/skillsDrive a REAL browser and native apps the way a user would — not fetch raw HTML — through the persistent `browse` CLI: one long-lived headless Chromium (plus iOS280skills.sh installs
6posthog avatarposthog-debuggerposthog/skillsDebug and inspect PostHog implementations on any website. Use this skill when a user wants to understand how PostHog is implemented on a page, troubleshoot trac278skills.sh installs