Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 SDK 16 Communicating with MPU6050

Hello,

I'm trying to get the PCA10056 to communicate with the MPU6050 Motion Processor (I think that's what it's called), but still in the very starting point. 

1 - I've found the example on Github, but it's for SDK 14 only. Is there an updated version to use with SDK 16?

2 - Is there a way to activate and use MPU6050 Digital Motion Processor with the INT pin? Even the Github example doesn't use this.

Thank you very much and best regards.

Edit: I was able to find SCL and SDA pin on the PCA10056 using the datasheet, and found the MPU6050. However, if there's only 1 SCL and 1 SDA pin on the PCA10056, then how do I add another TWI device, or use more than 1 TWI devices?

Parents
  • 1 - I've found the example on Github, but it's for SDK 14 only. Is there an updated version to use with SDK 16?

     To adapt a sample built using SDK 14 to SDK 16 do the following:

    Is there a way to activate and use MPU6050 Digital Motion Processor with the INT pin? Even the Github example doesn't use this.

    You could use the GPIOTE peripheral, which makes it possible to generate an event on a pin state change. Take a look at the GPIOTE example to get an idea of how to achieve this. Then connect the INT pin of the MP6050 to the nRF52 pin generating the event. You can have a handler(function) that is called when the event is triggered, and inside that function, you should initiate a TWI read to get the new data in the MPU6050.

     

    I was able to find SCL and SDA pin on the PCA10056 using the datasheet, and found the MPU6050. However, if there's only 1 SCL and 1 SDA pin on the PCA10056, then how do I add another TWI device, or use more than 1 TWI devices?

    Why do you need more than one TWI device? You can communicate with several TWI slaves from the TWI master on the nRF52 by using different addresses.

    Best regards,

    Simon

  • Thank you for the reply.

    I was able to replicate the project using SDK 16. I also have an idea of how to use GPIOTE to read an interupt, it was included in the example project also.

    However, I don't know how to activate and use MPU6050 Digital Motion Processing. What register do I need to write or read to get the processed value?

  • Check out the MPU6050 Datasheet, there you should find sufficient information on how to communicate with it.

    Best regards,

    Simon

Reply Children
No Data
Related