I have an Arduino Uno and I'm trying to connect an I2C sensor to it through my computer in MatLab. I have wired it according to the device's specifications, with the SDA line at pin A4 and the SCL line at pin A5.
Matlab recommends creating an object for the Arduino then scanning for I2C addresses like this:
a=arduino()
addrs=scanI2Cbus(a,0)
Which should return a 1x1 cell array with the I2C addresses. When I run this code however, I get an empty 0x0 cell array. Does anyone know why this might be? Thanks!