void saadc_callback(nrf_drv_saadc_evt_t const * p_event)
{
    if (p_event->type == NRF_DRV_SAADC_EVT_DONE)
    {
        ret_code_t err_code;

        err_code = nrf_drv_saadc_buffer_convert(p_event->data.done.p_buffer, SAMPLES_IN_BUFFER);
        APP_ERROR_CHECK(err_code);

        ADC_North =  p_event->data.done.p_buffer[0];
        ADC_East =  p_event->data.done.p_buffer[1];
        ADC_South =  p_event->data.done.p_buffer[2];
        ADC_West =  p_event->data.done.p_buffer[3];
       
        NRF_LOG_INFO("ADC event number: %d", (int)m_adc_evt_counter);

        NRF_LOG_INFO("North: \t\t%d", ADC_North);
        NRF_LOG_INFO("East:  \t\t%d", ADC_East);
        NRF_LOG_INFO("South: \t\t%d", ADC_South);
       NRF_LOG_INFO("West:  \t\t%d", ADC_West);
/*
        float angle;
        angle = atan(ADC_North/ADC_East);
        NRF_LOG_INFO("Angle: \t\t%d", angle);
*/
        m_adc_evt_counter++;
    }
}