Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI088 rawdata not working!!!

    BMI088 rawdata not working!!!

    Knight
    Occasional Visitor

    I made a custom board with esp32-c6 and bmi088, communicating via I2C. The problem is I couldn't read the proper data from the sensor. The data is shifted without me touching the board.I found the similar problems and solution from the thread but none of it could't solve my problem. My data looks like this.

    I (654546) IMU: X = 6 Y = 13 Z = 8
    I (655546) IMU: X = 14 Y = 65530 Z = 65531
    I (656546) IMU: X = 8 Y = 65528 Z = 9
    I (657546) IMU: X = 22 Y = 65520 Z = 4
    I (658546) IMU: X = 2 Y = 65519 Z = 65533
    I (659546) IMU: X = 65535 Y = 65532 Z = 65528
    I (660546) IMU: X = 9 Y = 19 Z = 6

    Here is my code. I tried to change the variable but didn't work.

    void readAccel(void){
        uint8_t accel_raw[6];
        ESP_ERROR_CHECK(register_read(ACCEL_SENSOR_ADDR, ACCEL_XOUT_H, accel_raw, 6));
        rawData.ax = (accel_raw[1] << 😎 | accel_raw[0];
        rawData.ay = (accel_raw[3] << 😎 | accel_raw[2];
        rawData.az = (accel_raw[5] << 😎 | accel_raw[4];
    }

     

    struct RawData
    {
        uint16_t ax, ay, az, gx, gy, gz;
    };

     

    1 REPLY 1

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    You may refer to the Arduino sample code on the Github at https://github.com/bolderflight/bmi088-arduino

    Thanks.

    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