This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use MPU 6050 Driver?

Hello,

I am trying to interface an MPU 6050 with an NRF52 with sdk vs 12.0. I noticed in the mpu6050.c file that it uses a twi_master.h file in the sdk in folder labeled as "deprecated". Should I change the mpu6050.c file to read to the nrf_drv_twi.h file.

Thanks

Parents
  • I suggest that you use the driver in this GitHub repo instead of the one in the SDK. The drivers were made by a colleauge, Martin Børs-Lind(@martinbl) and have a lot of features that the SDK driver does not have.

    -Bjørn

  • Hi again, I tried changing the pin definitions like you suggested, but it did not seem to solve the issue. When I oppened a terminal on my computer I got this:

    [1B]0 0000[1B]0000c0[1B]0 00,00[1B]00040[1B]0,000,0[1B]0 00, 0[1B]0 000 0[1B]0 0000[1B]060000[1B]0600,00[1B]040000 [1B]00x00[1B]0000 [1B]0400 00[1B]080000[1B]0,0000[1B]0 0000[1B]0,0000[1B]0,0000[1B]0,0000[1B]00000[1B]0,000,0[1B]0 000 0[1B]0,0000[1B]0000,0[1B]0,0000

    It kept going on like that. I'm not sure what exactly it means.

    Also, I noticed that the timer was commented out of the code for somereason.

    Thanks

Reply
  • Hi again, I tried changing the pin definitions like you suggested, but it did not seem to solve the issue. When I oppened a terminal on my computer I got this:

    [1B]0 0000[1B]0000c0[1B]0 00,00[1B]00040[1B]0,000,0[1B]0 00, 0[1B]0 000 0[1B]0 0000[1B]060000[1B]0600,00[1B]040000 [1B]00x00[1B]0000 [1B]0400 00[1B]080000[1B]0,0000[1B]0 0000[1B]0,0000[1B]0,0000[1B]0,0000[1B]00000[1B]0,000,0[1B]0 000 0[1B]0,0000[1B]0000,0[1B]0,0000

    It kept going on like that. I'm not sure what exactly it means.

    Also, I noticed that the timer was commented out of the code for somereason.

    Thanks

Children
No Data
Related