enableI2C
Enable I2C interface
Description
enableI2C(
enables the I2C bus at
its default bus speed of mypi
)100000
bps. You can then use the
Raspberry Pi® hardware board pins I2C1_SDA (GPIO 2) and I2C1_SCL (GPIO 3) as I2C
pins and interface the Raspberry Pi board with any I2C device to exchange data. The I2C bus is enabled by
default. To disable I2C, use disableI2C
.
Note
MATLAB® Support Package for Raspberry Pi Hardware does not support enableI2C
function
for the Bullseye operating system. Under Hardware Setup use the Configure
Peripheral Modules window to enable I2C interface on the Raspberry
Pi.
enableI2C(
enables the I2C bus and overrides the current bus speed.mypi
,i2cBusSpeed
)
Examples
Input Arguments
Version History
Introduced in R2014a
See Also
scanI2CBus
| i2cdev
| read
| write
| readRegister
| writeRegister
| disableI2C
| MATLAB Support Package for Raspberry Pi Hardware