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

Adding accelerometer value to own service

Hi, Im trying to add accelerometer value to my own service. 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? 

Related