[F/W] 가속도 센서 / 자이로 센서 코드/ 모션 센서 / 만보계 코드/ Step count / bmi160 init / bmi160.c / bmi 160 driver /

2021. 6. 8. 10:24💿/Firmware

motion_sensor.c
0.02MB
motion_sensor.h
0.00MB
bmi160.c
0.17MB
bmi160.h
0.02MB
bmi160_defs.h
0.05MB

상기 첨부 파일 last update
* @date    16 Oct 2017
* @version 3.7.2

모션센서는 I2c 통신을 하므로 I2c 관련 코딩도 필요

i2cm_support.c
0.01MB
i2cm_support.h
0.00MB

 

BMI160 Sensor API

Sensor overview

The small, low power BMI160 is a low noise 16-bit IMU designed for mobile applications such as AR or indoor navigation, providing highly accurate sensor data and real-time sensor data. The low current consumption of BMI160 enables always-on applications in battery-driven devices. This sensor features a configurable on-chip interrupt engine which provides motion-based gesture recognition and context awareness as always-on background functions.

Target Application

  • Augmented reality and immersive gaming
  • Indoor navigation
  • 3D-scanning / indoor mapping
  • Advanced gesture recognition
  • Immersive gaming
  • 9-axis motion detection
  • Air mouse applications and pointers
  • Pedometer / step counting
  • Advanced system power management for mobile applications
  • Optical image stabilization of camera modules
  • Free-fall detection and warranty logging

Features

  • Any-motion detection (accelerometer)
  • Significant motion detection (accelerometer)
  • Step detector (accelerometer)
  • Tap sensing (accelerometer)
  • Orientation recognition (accelerometer)
  • Flat detection (accelerometer)
  • Low-G / Free-fall detection (accelerometer)
  • High-G detection (accelerometer)
  • Slow-motion alert / No-motion interrupt (accelerometer)
  • Data ready detection (accelerometer, gyroscope and external sensors)
  • PMU trigger (gyroscope)
  • FIFO interrupts ((accelerometer, gyroscope and external sensors)

 

현재 사용하고 있는 model : Cypress사의 PSoC6 MCU CY8C6347BZI-BLD53

int8_t bmi160_read_step_counter(uint16_t *step_val, const struct bmi160_dev *dev)
===================================================================================

int8_t  MotionSensor_ReadSteps(uint16_t* steps)
{
    return bmi160_read_step_counter(steps,  &sensor);
}

uint16_t stepCount = 0;

MotionSensor_ReadSteps(&stepCount);

read step 함수만 사용하여, 현재 코드에선 스탭수만 추출하여 사용중.

 

 

출처 : Bosch Sensortec GmbH

하단 BoschSensortec Github에 최신 C(2020) 버전이 있습니다.

https://github.com/BoschSensortec/BMI160_driver

 

BoschSensortec/BMI160_driver

Bosch Sensortec BMI160 sensor driver. To report issues, go to https://community.bosch-sensortec.com/t5/Bosch-Sensortec-Community/ct-p/bst_community - BoschSensortec/BMI160_driver

github.com