Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Using BMI270 accelerometer high rate sampling

    Using BMI270 accelerometer high rate sampling

    pedro_nf
    Occasional Visitor

    Hi all,

    I'm using the new Arduino Nano 33 BLE Sense that includes a BMI270, searched a few hours but still didn't find enough info on how to acquire high rate accelerometer data into an array. The objective is to FFT this data in order to get the vibration frequencies, but that will be the easy part once I have the data inside an array. Anyone can give me some pointers on where can I find info about getting high rate accelerometer data into an array?

    Thanks in advance

    1 REPLY 1

    BSTRobin
    Community Moderator
    Community Moderator

    Hi pedro_nf,

    There is BMI270 example code on github https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/accel_gyro/accel_gyr..., you could set ODR value according your application.

    /*! Accelerometer Output Data Rate */
    #define BMI2_ACC_ODR_0_78HZ UINT8_C(0x01)
    #define BMI2_ACC_ODR_1_56HZ UINT8_C(0x02)
    #define BMI2_ACC_ODR_3_12HZ UINT8_C(0x03)
    #define BMI2_ACC_ODR_6_25HZ UINT8_C(0x04)
    #define BMI2_ACC_ODR_12_5HZ UINT8_C(0x05)
    #define BMI2_ACC_ODR_25HZ UINT8_C(0x06)
    #define BMI2_ACC_ODR_50HZ UINT8_C(0x07)
    #define BMI2_ACC_ODR_100HZ UINT8_C(0x08)
    #define BMI2_ACC_ODR_200HZ UINT8_C(0x09)
    #define BMI2_ACC_ODR_400HZ UINT8_C(0x0A)
    #define BMI2_ACC_ODR_800HZ UINT8_C(0x0B)
    #define BMI2_ACC_ODR_1600HZ UINT8_C(0x0C)

    /*! Gyroscope Output Data Rate */
    #define BMI2_GYR_ODR_25HZ UINT8_C(0x06)
    #define BMI2_GYR_ODR_50HZ UINT8_C(0x07)
    #define BMI2_GYR_ODR_100HZ UINT8_C(0x08)
    #define BMI2_GYR_ODR_200HZ UINT8_C(0x09)
    #define BMI2_GYR_ODR_400HZ UINT8_C(0x0A)
    #define BMI2_GYR_ODR_800HZ UINT8_C(0x0B)
    #define BMI2_GYR_ODR_1600HZ UINT8_C(0x0C)
    #define BMI2_GYR_ODR_3200HZ UINT8_C(0x0D)

    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