主要内容

Inter-Integrated Circuit

Communicate with Raspberry Pi® hardware using Inter-Integrated Circuit (I2C) interface

Inter-Integrated Circuit (I2C) is a chip-to-chip interface supporting two-wire communication. You can connect to I2C peripheral devices and read from and write to them. Using the I2C communication protocol, your Raspberry Pi hardware can communicate with microcontrollers and peripherals such as sensors and displays.

Blocks

I2C Controller ReadRead data from I2C peripheral device or I2C peripheral device register
I2C Controller WriteWrite data to I2C peripheral device or I2C peripheral device register

Objects

i2cdevConnection to device on Raspberry Pi hardware

Functions

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

Apps

Raspberry Pi Resource Monitor AppMonitor and manage Raspberry Pi resources

Topics

Featured Examples