标题: [M451] Use I2C to Drive MPU6050 [打印本页] 作者: admin 时间: 2022-9-30 10:16 标题: [M451] Use I2C to Drive MPU6050
Application: This sample code is M451 drives and controls six-axis sensor MPU6050 through I2C interface.
BSP Version: M451 Series BSP CMSIS v3.01.003
Hardware: SmartM-M451 Mini
The sample code uses M451 GPIO to simulate I2C to initialize 6-axis sensor, and reads 6-axis sensor data through I2C.The M451 sends data to PC through UART, so that the position change of 6-axis sensor can be seen intuitively in PC software. The 6-axis sensor used in this code is InvenSense MPU 6050, which communicates with I2C protocol. Initialization and control interface functions can be found in the MPU6050.c function prototype, sensor settings and data acquisition refer to the specifications of MPU6050.