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

BLE accelerometer

Greetings,

I'm using nRF52 DK to transfer LIS3DH accelerometer data in Bluetooth. I successfully managed to establish an I2C connection with my sensor, I get my XYZ values. Now I want to send the data in Bluetooth, I'm a bit confused about what to do next. Is there any example program in SDK that will help me? or if you can suggest to me some tutorial that would be helpful too. I'm a beginner, so any advice or suggestions are welcome. Thank you.

Parents Reply
  • Hi, I found the problem. The device is advertising, When I connect to the nRF Connect application, I can not see my service, the status says disconnected. 

    This is the timer event handler I use in the program

    static void timer_timeout_handler(void * p_context)
    {
    // Acquire accelerometer data
    MPU6050_ReadAcc(AccValue); // accelerometer read
    acc[0] = AccValue[0];
    acc[1] = AccValue[1];
    acc[2] = AccValue[2];

    characteristic_accel_update(&m_our_service, acc);
    }

    If I  line comment my accelerometer read function, The app works fine, I can see the service and its characters at the nrf connect(without accel. values). How can I include my accelerometer read function into my program without crashing the app? 

Children
Related