Hi, I have successfully interface BMI270 using I2C protocol. Also I am able to load configuration file. https://github.com/BoschSensortec/BMI270-Sensor-API I am referring examples code from above link. I have received various activities like running, walking etc. from this example "\examples\bmi270\step_activity". I want these two activities "ON_BICYCLE", "IN_VEHICLE". This activity recognition is provided in "bmi270_context" folder. But I am getting this warning "Warning [1] : FIFO empty". I am referring this example file "activity_recognition". Move the board for activity recognition for 30 sec : Fifo length = 0 Requested FIFO data frames : 5 Warning [1] : FIFO empty Parsed FIFO data frames : 0 I received this output on serial terminal. Code is entering in to while loop but not entering in below for loop because value of act_frames received is 0. if (rslt == BMI2_OK) { /* Update FIFO structure */ fifoframe.data = fifo_data; fifoframe.length = 516; rslt = bmi2_get_fifo_length(&fifo_length, &bmi2_dev); printf("Fifo length = %d \n", fifo_length); /* Read FIFO data */ rslt = bmi2_read_fifo_data(&fifoframe, &bmi2_dev); bmi2_error_codes_print_result(rslt); while (rslt != BMI2_W_FIFO_EMPTY) { /* Provide the number of frames to be read */ act_frames = 5; printf("Requested FIFO data frames : %d\n", act_frames); /* Get the activity output */ rslt = bmi270_context_get_act_recog_output(act_recog_data, &act_frames, &fifoframe, &bmi2_dev); bmi2_error_codes_print_result(rslt); printf("Parsed FIFO data frames : %d\r\n", act_frames); for (count = 0; count < act_frames; count++) { printf( "Activity Recognition output[%d]:Sensor time: %d\t Previous activity: %s\t current: %s\n", count, act_recog_data[count].time_stamp, activity_reg_output[act_recog_data[count].prev_act], activity_reg_output[act_recog_data[count].curr_act]); } } } Please help me to achieve these functionalities. Thanks in advanced.
... View more