Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

I2C 接口

使用 Raspberry Pi® 的 I2C 接口

使用 Raspberry Pi I2C 接口连接和控制设备

对象

raspiConnection to Raspberry Pi board
i2cdevConnection to device on Raspberry Pi hardware

函数

scanI2CBusScan I2C bus device addresses
readRead data from I2C device
writeWrite data to I2C device
readRegisterRead from register on I2C device
writeRegisterWrite to register on I2C device
enableI2C
disableI2C

主题

疑难解答

Troubleshoot Raspberry Pi I2C Interface

Troubleshoot I2C interface on the Raspberry Pi hardware.

精选示例