Hey everyone!
I would like to read the data from the integrated LSM6DS3 IMU sensor in the Arduino Nano 33 IoT.
When using "port1", I only get an array filled with zeros with the read function or a single zero with the readRegister function.
When using "port2", I get [4 17 51 67 255 255 255 … ] with the read function an 4356 with the readRegister function, independent from movement or tilt.
I've already read the documentation, but it seems I don't really understand what is going on here.
And what does the error message "I2C address '96 (0x60)' already in use." mean when I try to run the script again without clearing the arduino object first?
I would be glad if someone could help me!
Kind regards,
Matthias
clear;a = arduino('COM8','Nano33IoT','Libraries','I2C');%% Scan for device adress
ports = scanI2CBus(a,0);% Avaliable ports
port1 = '0x60';port2 = '0x6A';%%
IMU = device(a,'I2CAddress',port2);out = read(IMU,10);value = readRegister(IMU,port2,'uint16')
Best Answer