pico_info
Retrieve information about Pico boards connected through the mcp2tcp server, enabling AI models to access hardware data via TCP communication.
Instructions
查询Pico板信息
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tests/tcp_server.py:27-36 (handler)The handler function that executes the 'pico_info' tool logic, providing device information including uptime, PWM frequency, LED state in JSON format.def get_pico_info(self): uptime = int(time.time() - self.start_time) info = { "device": "Raspberry Pi Pico", "firmware_version": "1.0.0", "current_pwm": self.pwm_frequency, "led_state": self.led_state, "uptime_seconds": uptime } return f"CMD {json.dumps(info)}\r\n"
- tests/tcp_server.py:56-58 (registration)Registration and dispatching logic for the 'CMD_PICO_INFO' command, which corresponds to the 'pico_info' tool, routing to the handler.# 处理Pico信息查询命令 elif command == "CMD_PICO_INFO": return device_state.get_pico_info()