Agent Skills › espressif/esp-claw › read_touch

read_touch

GitHub

用于读取电容式触摸传感器的平滑数值。通过验证GPIO并调用Lua脚本,获取指定通道在特定采样间隔下的触摸数据,适用于需要监测触摸输入状态的硬件交互场景。

components/lua_modules/lua_driver_touch/skills/read_touch/SKILL.md espressif/esp-claw

Trigger Scenarios

查询触摸传感器平滑值 读取电容式触摸通道读数 获取触摸数据

Install

npx skills add espressif/esp-claw --skill read_touch -g -y
More Options

Non-standard path

npx skills add https://github.com/espressif/esp-claw/tree/master/components/lua_modules/lua_driver_touch/skills/read_touch -g -y

Use without installing

npx skills use espressif/esp-claw@read_touch

指定 Agent (Claude Code)

npx skills add espressif/esp-claw --skill read_touch -a claude-code -g -y

安装 repo 全部 skill

npx skills add espressif/esp-claw --all -g -y

预览 repo 内 skill

npx skills add espressif/esp-claw --list

SKILL.md

Frontmatter
{
    "name": "read_touch",
    "metadata": {
        "cap_groups": [
            "cap_lua"
        ],
        "manage_mode": "readonly"
    },
    "description": "Read smoothed capacitive touch sensor values from one or more input GPIO channels. Use when the user asks for touch smooth values, capacitive touch channel readings, or smoothed touch data. Requires explicit gpios and board_hardware_info before assigning GPIOs."
}

Read Touch

Use this skill only to read smooth values from capacitive touch input channels.

Run exactly one script with lua_run_script.

Read board_hardware_info before assigning GPIOs. Verify the requested GPIOs are touch-capable for the target chip and are not occupied by unrelated board hardware.

If lua_run_script returns an error, report that error directly to the user. Do not retry with changed GPIOs unless the user explicitly asks.

Script Args Schema

{
  "type": "object",
  "required": ["gpios"],
  "properties": {
    "gpios": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0
      },
      "minItems": 1,
      "description": "Touch-capable GPIO numbers to sample."
    },
    "samples": {
      "type": "integer",
      "default": 10,
      "minimum": 1,
      "maximum": 100
    },
    "interval_ms": {
      "type": "integer",
      "default": 200,
      "minimum": 0,
      "maximum": 10000
    }
  }
}

Tool Call Inputs

Read one sample from several touch GPIOs:

{"path":"{CUR_SKILL_DIR}/scripts/read_touch.lua","args":{"gpios":[2,3,4],"samples":1}}

Read repeated smooth values:

{"path":"{CUR_SKILL_DIR}/scripts/read_touch.lua","args":{"gpios":[2,3,4,5],"samples":20,"interval_ms":300}}

Recommended Flow

  1. Activate board_hardware_info before operating touch hardware.
  2. Use only explicit gpios from the user or from verified board hardware information.
  3. Run {CUR_SKILL_DIR}/scripts/read_touch.lua with gpios, samples, and interval_ms.
  4. Report the returned smooth values by sample, GPIO, and touch channel.

Output Meaning

  • smooth: smoothed touch sensor data from TOUCH_CHAN_DATA_TYPE_SMOOTH.
  • gpio: input GPIO sampled by the touch driver.
  • channel: touch sensor channel mapped from the GPIO.

Version History

  • 06eb576 Current 2026-07-24 19:54

Same Skill Collection

components/claw_capabilities/cap_http_request/skills/cap_http_request/SKILL.md
components/claw_capabilities/cap_im_platform/skills/cap_im_platform/SKILL.md
components/claw_capabilities/cap_router_mgr/skills/cap_router_mgr/SKILL.md
components/claw_capabilities/cap_scheduler/skills/cap_scheduler/SKILL.md
components/claw_capabilities/cap_web_search/skills/cap_web_search/SKILL.md
components/claw_modules/claw_memory/skills/memory_ops/SKILL.md
components/claw_modules/claw_memory/skills/profile_memory_ops/SKILL.md
components/common/skill_builder/skills/skill_creator/SKILL.md
components/common/skill_builder/skills/skills_lab_downloader/SKILL.md
components/common/skill_builder/skills/skills_lab_search/SKILL.md
components/lua_modules/lua_module_ble_hid/skills/ble_hid/SKILL.md
components/lua_modules/lua_module_ble/skills/ble/SKILL.md
components/lua_modules/lua_module_camera/skills/take_picture/SKILL.md
components/lua_modules/lua_module_http_server/skills/http_server_lua_demo/SKILL.md
components/claw_capabilities/cap_llm_inspect/skills/cap_llm_inspect_image/SKILL.md

Metadata

Files
0
Version
74b1870
Hash
b5d62f87
Indexed
2026-07-24 19:54

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 00:30
浙ICP备14020137号-1