MATLAB: Unable to connect to I2C on Raspberry with i2cdev

i2ci2cdevi2cgetraspberry

Hi! I have successfully connected my Raspi with Matlab. The raspi fcn works fine, but when I try to connect my ACC sensor from 0x1d at the I2C bus with the command i2cdev I get no result. I tried the same on my raspberry with the function i2cget which returned 0x00, my other sensor which connects fine returns 0x06.
Error using raspi.internal.i2cdev (line 60)
There is no I2C device with address 0x1D on the I2C bus. Use scanI2CBus
method of the raspi object to see addresses of I2C devices attached to the
I2C bus.
Error in raspi/i2cdev (line 507)
i2cObj = raspi.internal.i2cdev(obj, varargin{:});
With a python script on my Raspi I am able to read and write to the sensor, therefore I am confused…
Please help!

Best Answer

What does the following commands return:
>> rpi = raspi;
>> scanI2CBus(raspi)
If your ACC sensor is detected on the I2C bus, the address '0x1D' should be returned as output.