Hi,
I'm trying to send an data array over ble nus.
static void app_timer_handler(void * p_context)
{
if(m_conn_handle != BLE_CONN_HANDLE_INVALID)
{
uint8_t data_array[4];
float val0;
float val1;
float val2;
float val3;
uint8_t data0[20];
uint8_t data1[20];
uint8_t data2[20];
uint8_t data3[20];
ret_code_t err_code;
err_code = nrfx_saadc_sample_convert(0, &m_sample);
APP_ERROR_CHECK(err_code);
val0 = m_sample * 3.3 / 4096;
sprintf((char*)data0, "%.2f", val0);
data_array[0] = data0;
err_code = nrfx_saadc_sample_convert(1, &m_sample);
APP_ERROR_CHECK(err_code);
val1 = m_sample * 3.3 / 4096;
sprintf((char*)data1, "%.2f", val1);
data_array[1] = data1;
err_code = nrfx_saadc_sample_convert(2, &m_sample);
APP_ERROR_CHECK(err_code);
val2 = m_sample * 3.3 / 4096;
sprintf((char*)data2, "%.2f", val2);
data_array[2] = data2;
err_code = nrfx_saadc_sample_convert(3, &m_sample);
APP_ERROR_CHECK(err_code);
val3 = m_sample * 3.3 / 4096;
sprintf((char*)data3, "%.2f", val3);
data_array[3] = data3;
uint16_t d_len = sizeof(data_array)-1;
err_code = ble_nus_data_send(&m_nus, data_array, &d_len, m_conn_handle);
APP_ERROR_CHECK(err_code);
}
}
This didn't work.
I'm also getting this warning.

I'm doing something wrong, but I don't know what. Do I also have to change the receiving part of the central device to receive the data array?