Initialization and operation of sensor mpu6050 with nrf52840 development board

I want to be able to read the gyro and accelerometer values from the MPU6050 sensor.

As a base start I downloaded the nRF5 SDK v15.3.0  and modified twi_sensor_pca10056 program using editor software Kielu5 to initialize the MPU6050. My current results are that when I am printing the gyro and accelerometer values serially on UART the values are not being printed. The problem I think is coming from the MPU6050 initialization. Because the TWI supposed to work fine since its a working project and I also tested the UART by sending some initial test strings before operating.

I modified the project by including the following MPU related libraries in the main project:

  • sensor_mpu6050.h
  • sensor_mpu6050.c

I am connecting the SCL and SDL to the following respective board pins:

       SCL    = MPU6050_SCL_PIN,      // PIN 0.27
       SDA    = MPU6050_SDA_PIN,     // PIN 0.26

In the main.c , I am initializing the MPU and trying to read the MPU values and displaying them on a serial  terminal window using UART.

I am attaching the current working project inside the nRF5 SDK v15.3.0  ,Since there are certain libraries are spread across the SDK.

PATH LINK TO CURRENT WORKING PROJECT :     nRF5_SDK_15.3.0_59ac345\examples\peripheral\twi_sensor\pca10056\blank\arm5_no_packs

I would appreciate someone's help since I'm new to this type of technology, don't hesitate to ask for more information.

No Data
Reply Children