02-08-2022 08:56 PM
I am working on BMX160 using I2C, I can get the data of Accel but can't get any valid Magnetometer data. I found that almost all the examples using bmm150 to get this data. https://github.com/BoschSensortec/BMI160_driver/wiki/How-to-use-an-auxiliary-sensor-or-magnetometer-.... and https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMX160-magnetometer-problem/td-p/7628/pa... , but I found some defines in bmm150_def.h are not the same as the datasheet of BMX160. For example :
Solved! Go to Solution.
02-08-2022 11:22 PM
02-09-2022 01:33 PM
Thank you for you help,Minhwan. I will transplant it to my platform and check it today.
02-16-2022 03:15 PM
Hi Minhwan,
I am not sure if the magetometer data I got are correct or not.
After I put the codes into my platform, it seems that the initialization is good, but I can't get the correct data from this codes(froom fifo), but I can read the datas from registers 0x04 to 0x17, and the data changed every time I read. the data of accelerometer are correct for sure. But I am not sure if the data of the magetometer are correct or not. I have 2 BMX160 at the same place and they looks so different.
The data of the first one looks strange. I turned the BMX160 to different directions but the number of z always negative, from -170 to - 550, most of the time are -200 to -300. and the number of y is always positive, from 200 to 1700, most of the time 700-1200.the number of x looks good, change a lot when I turn it to different direction, from -159 to +1500.
The data of another are different. z from -200 to + 100, y from -200 to +1500, x from -200 to +1500.
here are the data at the same direction at the same time almost at the same place. ('point' and 'face' are different faces of our product,they are 90 degree )
point to south , face up: #1, 993, 1665, -501 #2, 849, 1145, -245
point to south , face down: #1, 1001, 329, -247 #2, 945, 505, 103
point to north , face up #1, 249, 1697, -463 #2, 89, 1433, -203
point to north , face down #1, 249, 289, -291 #2, 113, -135, -45
point up face south #1, 1433, 1449, -389 #2, 1273, 1145, -77
point up face north #1, 1433, 625, -379 #2, 1337, 193, -39
point down face south #1, -183, 1153, -493 #2, -335, 1001, -177
point down face north #1, -167, 593, -323 #2, -263, 329, -15
data change a little when put it to the same direction.
02-16-2022 09:40 PM
Hi tangtingzhu,
I'm gonna check it and back to you.
Thanks,