Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
A new method i2cRead() is added to the arduino.m file. The adiosrv.ped file is modified accordingly. So, with this add-on, your Arduino Uno can speak in I2C through Simulink. The I2C read functionality can be accessed either from Matlab command window or Simulink.
1) In command window, a sample syntax is
a.i2cRead(hex2dec('5A'), hex2dec('07'))
where '5A' denotes the 7bit device address in hex format 0x5A, and '07' denotes the register address '0x07'.
2) In Simulink, you can find the Arduino I2C read block in the arduino_io_lib. When you put the Arduino I2C Read block into your block diagram, be sure to put the correct device address and register address to the parameter field. Help doc is available for instruction inside this download.
Cita come
Zhuo Li (2026). I2C block for ArduinoIO simulink package (https://it.mathworks.com/matlabcentral/fileexchange/41602-i2c-block-for-arduinoio-simulink-package), MATLAB Central File Exchange. Recuperato .
Riconoscimenti
Ispirato da: Legacy MATLAB and Simulink Support for Arduino
Ispirato: Interface an LSM303DLHC
Informazioni generali
- Versione 1.7.0.0 (142 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
