Reply To: BerryIMU and Matlab

Home Forums Forums Technical Support for BerryIMU BerryIMU and Matlab Reply To: BerryIMU and Matlab

#6124
nightpoison
Participant

Hi,

So im still having issues regarding matlab and the BerryIMU. But I've done some more research and narrowed it down to what I am specifically needing help with.

Matlab has the ability to directly connect to I2C devices by creating an object using the devices address. here is two functions that I can use to read data from the device read() & readRegister()

read(device, count, precision) -
device = object connection with the IMU
count = the number of elements I can expect
precision = specified as a string. Match the data precision to the size of the register on the device. Optional.

readRegister(device, register, precision) -
device = object connection with the IMU
register = register #
Precision = specified as a string. Match the data precision to the size of the register on the device. Optional.

can I use the LSM9DS0 to identify the registers on the IMU and then use readRegister to bring in the data? If that's the case, which registers do I need to read in order to get the data I need.

for instance in regards to the write function to enable the gyro. I know I need to send 0b00001111 to CTRL_REG1_G. But the register access is a scaler, so I can't use the register name such as in python. how are the registers numbered?

Blip, blop, bloop...