Dispositivi I2C
R2026bCreare un oggetto Arduino utilizzando arduino prima di utilizzare le funzioni I2C. Per maggiori informazioni vedere Connect to Arduino Hardware. È possibile utilizzare Arduino Explorer per configurare in modo interattivo l'interfaccia di comunicazione I2C e utilizzarla per leggere e scrivere dati su dispositivi I2C collegati a Arduino e ad altro hardware supportato in MATLAB® e MATLAB Online™. Per maggiori informazioni, vedere Connect to I2C Device Using Arduino Explorer App.
Per un elenco completo dell'hardware supportato nella versione di MATLAB installata, vedere Supported Hardware. Per ulteriori informazioni sulle schede, i workflow e le piattaforme supportati su MATLAB Online, vedere Get Started with MATLAB Online for Arduino.
Nota
Tutte le funzioni, tranne scanI2CBus, generano codice utilizzando il blocco MATLAB Function. Per maggiori dettagli, vedere Deploy Arduino Functions to Arduino Hardware Using MATLAB Function Block.
Funzioni
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 |
Argomenti
- 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.