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

Problem with MPU6050 and nRF51822 to send Data over BLE..

I am trying to send the MPU6050 data using BLE nRF51822. I have used ble_app_uart example modified it to read the data over I2C and send the data over BLE. I can successfuly read device ID but when i read accelerometer or gyroscope data I am unable to read any register. Please help me 

Parents
  • So your question is actually just about how to read the sensor - not (yet) about how to send data over BLE.

    It is important to take these things one step at a time!

    I can successfuly read device ID

    So you must have your basic I2C comms working, then.

    but when i read accelerometer or gyroscope data I am unable to read any register

    So there must be something wrong with your higher-level code.

    You need to check your code carefully against the MPU6050's datasheet - and confirm that you are doing exactly what it says. 

    You should also look at the I2C line with an analyser or oscilloscope to see what is acually happening - and, again, confirm that it meets the datasheet requirements.

    This is all standard interface debugging stuff - nothing specifically to do with Nordic.

    www.avrfreaks.net/.../2418156

Reply
  • So your question is actually just about how to read the sensor - not (yet) about how to send data over BLE.

    It is important to take these things one step at a time!

    I can successfuly read device ID

    So you must have your basic I2C comms working, then.

    but when i read accelerometer or gyroscope data I am unable to read any register

    So there must be something wrong with your higher-level code.

    You need to check your code carefully against the MPU6050's datasheet - and confirm that you are doing exactly what it says. 

    You should also look at the I2C line with an analyser or oscilloscope to see what is acually happening - and, again, confirm that it meets the datasheet requirements.

    This is all standard interface debugging stuff - nothing specifically to do with Nordic.

    www.avrfreaks.net/.../2418156

Children
Related