Agent Skillsespressif/esp-claw › read_touch

read_touch

GitHub

读取电容式触摸传感器的平滑值。需先验证GPIO有效性,再运行Lua脚本获取指定引脚的触摸数据并报告结果。

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

触发场景

询问触摸平滑值 请求电容式触摸通道读数 获取平滑触摸数据

安装

npx skills add espressif/esp-claw --skill read_touch -g -y
更多选项

非标准路径

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

不安装直接使用

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.

版本历史

  • 06eb576 当前 2026-07-24 19:54

同 Skill 集合

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

元信息

文件数
0
版本
74b1870
Hash
b5d62f87
收录时间
2026-07-24 19:54

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 13:27
浙ICP备14020137号-1 $访客地图$