Dispositivi I2C
Creare un oggetto Arduino utilizzando arduino prima di utilizzare le funzioni I2C. Per maggiori informazioni vedere Connect to Arduino Hardware. È inoltre possibile utilizzare l'app Arduino Explorer per configurare l'interfaccia di comunicazione I2C e utilizzare l'interfaccia per leggere e scrivere i dati sui dispositivi I2C collegati all'hardware Arduino.
Nota
Tutte le funzioni, tranne scanI2CBus, possono essere utilizzate per generare 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 register |
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.