i2c_scan
Scan the I2C bus for 7-bit addresses and list possible devices at each responding address, with optional low/high range limits.
Instructions
扫描 I2C 总线上的 7 位地址,标出每个应答地址上可能是什么器件。
这是「板子上到底挂了什么」的第一手答案。low/high 可缩小范围 (默认 0x08–0x77,即 I2C 规范里可自由分配的段;保留段会被跳过)。
★ 三条边界(别把结论放大): · 「有应答」只说明该地址有人 ACK,不代表这颗器件功能正常; · 同一地址常被多颗器件共用(0x68 上可能是 MPU-6050 也可能是 DS1307), 要定种必须读它的 WHO_AM_I / ID 寄存器(i2c_read_reg); · 挂在 TCA9548A 这类 I2C 多路复用器后面的器件默认是断开的, 直接扫主总线只能看到复用器自己(0x70–0x77)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bus | No | ||
| low | No | ||
| high | No | ||
| port | No | ||
| baudrate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |