dfrobot_stcc4_i2c
Use this skill when the user asks to detect or read Sensirion STCC4 CO2 concentration (ppm). This sensor readout also includes temperature and humidity.
Typical Chinese requests:
- 帮我检测一下 STCC4 的 CO2 浓度
- 读取 STCC4 的二氧化碳浓度
- 看一下 STCC4 的空气质量
- 读取 STCC4 的温湿度和 CO2
Typical English requests:
- Check STCC4 CO2 concentration
- Read STCC4 CO2 ppm
- Measure air quality with STCC4
- Read STCC4 CO2, temperature, and humidity
Run exactly one bundled Lua script with lua_run_script.
Script Args Schema
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["read", "start", "stop"]
},
"i2c_port": { "type": "integer", "minimum": 0, "maximum": 1 },
"sda": { "type": "integer", "minimum": 0, "maximum": 63 },
"scl": { "type": "integer", "minimum": 0, "maximum": 63 },
"i2c_freq_hz": { "type": "integer", "minimum": 10000, "maximum": 1000000 },
"addr": { "type": "integer", "minimum": 8, "maximum": 119 },
"start_if_needed": { "type": "boolean" },
"wait_after_start_ms": { "type": "integer", "minimum": 0, "maximum": 5000 },
"verify_crc": { "type": "boolean" }
}
}
Tool Call Inputs
{"path":"{CUR_SKILL_DIR}/scripts/read_sensor_data.lua","args":{"action":"read"}}
Use explicit address 0x64 and CRC verification:
{"path":"{CUR_SKILL_DIR}/scripts/read_sensor_data.lua","args":{"action":"read","addr":100,"verify_crc":true}}
Start continuous measurement only:
{"path":"{CUR_SKILL_DIR}/scripts/read_sensor_data.lua","args":{"action":"start"}}
Stop continuous measurement only:
{"path":"{CUR_SKILL_DIR}/scripts/read_sensor_data.lua","args":{"action":"stop"}}
Recommended Flow
- Confirm sensor wiring and I2C address.
- If user does not provide address, use STCC4 default address
0x64. - Run
{CUR_SKILL_DIR}/scripts/read_sensor_data.luawithaction = "read"to get one sample. - Use
startandstopactions only when user explicitly asks to control measurement state. - Report script output directly.