Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    bmx160 geomagnetic sensor data

    bmx160 geomagnetic sensor data

    Jagath
    Member

    Hello

    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

    Jagath

     

    6 REPLIES 6

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Jagath,

    The attachment is an example based on BMI160 and BMM150 on GitHub for your reference.
    https://github.com/BoschSensortec/BMI160_driver
    https://github.com/BoschSensortec/BMM150-Sensor-API

    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

    Hello,

    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?

    Nigel_Zhu
    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?

    BSTRobin
    Community Moderator
    Community Moderator

    Helo Nigel_Zhu,

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

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist