Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    bmx160 geomagnetic sensor data

    bmx160 geomagnetic sensor data



    I am using the bmx160 sensor for a project there is no exact source code for bmx160. I need to use BMI160 for the accelerometer and gyro and for the magnetic sensor I need to use BMM160 source code.

    I have configured the BMI160 code for BMX160 and got accelerometer and gyro values.

    How to configure BMM150 source code for BMX160 sensor along with BMI160  source code.

    The address map of  BMM150 is different from BMX160.

    Is there any source code for BMX160  where all 3 sensor data can be read out.


    Thank you



    6 REPLIES 6

    Community Moderator
    Community Moderator

    Hello Jagath,

    The attachment is an example based on BMI160 and BMM150 on GitHub for your reference.

    You can open the following macro and refer to the DATA_POLL macro to read 9 axis data.

    #define USE_BMI160
    #if defined(USE_BMI160)
    #define USE_EXT_BMM150
    #define DATA_POLL


    In fact, what I don't know is what range the read original data should conform to before it can be regarded as correct data, so as to know that there is no configuration error in my initialization register? What kind of law should the read raw data conform to?

    New Poster

    After I have configured the relevant registers of accel and gyro, it can work normally and the data obtained is correct, but my magnetometer has no response. Can you tell me how to configure it to make the magnetometer work normally? I use the driver written by myself. Can you directly tell me which registers need to be configured and how many to make them work normally?

    Community Moderator
    Community Moderator

    Helo Nigel_Zhu,

    Sensor API can help users quickly configure sensors. Could you refer example code and run it?