Dispositivos I2C
R2026bCree un objeto de Arduino utilizando arduino antes de usar funciones I2C. Para obtener más información, consulte Connect to Arduino Hardware. También puede utilizar Arduino Explorer para configurar interactivamente la interfaz de comunicación I2C y usarla para leer y escribir datos en dispositivos I2C conectados a Arduino y otro hardware compatible en MATLAB® y MATLAB Online™. Para obtener más información, consulte Connect to I2C Device Using Arduino Explorer App.
Para obtener una lista completa de hardware compatible con la versión instalada de MATLAB, consulte Supported Hardware. Para obtener más información sobre placas admitidas, flujos de trabajo y plataformas compatibles con MATLABOnline, consulte Get Started with MATLAB Online for Arduino.
Nota
Todas las funciones, excepto scanI2CBus, generan código usando el bloque MATLAB Function. Para obtener más información, consulte Deploy Arduino Functions to Arduino Hardware Using MATLAB Function Block.
Funciones
device | Connection to device on I2C bus on Arduino or ESP32 hardware |
scanI2CBus | Scan I2C bus on Arduino hardware for device address |
read | Read data from I2C bus |
write | Write data to I2C bus |
readRegister | Read data from I2C device register |
writeRegister | Write data to I2C device registers |
Temas
- Communicate with an I2C EEPROM Device
Learn how to store and retrieve data from an I2C EEPROM device.
- Measure Temperature from I2C Device on Arduino Hardware
Learn how to measure temperature from an I2C device on your Arduino hardware.
- Arduino I2C Interface
Learn how Arduino hardware interfaces with the I2C protocol.
- Use Arduino Explorer App
Learn how to use the Arduino Explorer app to configure GPIO pins and communication protocol interfaces and visualize data.
- Connect to I2C Device Using Arduino Explorer App
I2C (Inter-Integrated Circuit) is a two-wire serial communication protocol that uses a serial data line (SDA) and a serial clock line (SCL) to exchange data between a controller and one or more peripheral devices.