Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI270 GYRO data using SPI in C

    BMI270 GYRO data using SPI in C

    manivt
    Member

    Hi i am a fresher in development and I am trying  to get only gyroscope data from BMI270 sensor. Initially I have tried to get the data from example code from github  - boschsensortec /BMI270_SensorAPI , I tried to build -  bmi270_examples/gyro/gyro.c . I got error that  COINES is not included later i included COINES package as well and set the directory path correctly . Even though I didnot get any data .

     

    Hardware wise I am only using BMI270 and I have made the connections to microprocessor as per the documentaion of 4 wire SPI .

    so i want to get more clarification how to get data from BMI270

    - does it require any other hardware like Application board or shuttle board .

    - does the sensor require any configuration through software , if so , please list down them with thier dependicies.

    - can we build the cdoe without using COINES package .

    - or list any other way of getting gyro data from sensor using C code without external dependicies.

     

    4 REPLIES 4

    BSTRobin
    Community Moderator
    Community Moderator

    Hi manivt,

    Thanks for your inquiry.
    If you want to use COINES code directly, you need the APP 3.0 board and the BMI270 Shuttle board 3.0
    If you don't have an APP 3.0 board and a BMI270 Shuttle Board 3.0 board, you can refer to the BMI270 sensor API and examples on Github(https://github.com/boschsensortec/BMI270_SensorAPI) and migrate them to your host hardware.
    I also uploaed BMI270 example code on STM32 for your reference, hope it will be helpful for you.

    Thanks for the response , I have earlier tried using  github example code ( boschsensortec/BMI270_SensorAPI/bmi270_examples/gyro ) and I have inculded all the required depedencies .

    In Make of gyro it is asking for path for COINES but i want to use the sensor without COINES

    COINES_INSTALL_PATH ?= ../../../..

    EXAMPLE_FILE ?= gyro.c

    API_LOCATION ?= ../..

    COMMON_LOCATION ?= ..

    C_SRCS += \
    $(API_LOCATION)/bmi2.c \
    $(API_LOCATION)/bmi270.c \
    $(COMMON_LOCATION)/common/common.c

    INCLUDEPATHS += \
    $(API_LOCATION) \
    $(COMMON_LOCATION)/common

    include $(COINES_INSTALL_PATH)/coines.mk

     

    - Can I remove COINES path and its code file and use the code

    - Or am I using the wrong example code for using the sensor

    - Do I have to make any changes in code to make sensor work

    BSTRobin
    Community Moderator
    Community Moderator

    Hi manivt,

    If you would like to run BMI270 sensor API and examples on your own host & BMI270 hardware, you don't need code related to Coines, replace it with code from your host platform.

    can you list me down where do need to make changes on code to make example code running

    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