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

uart + twi sensor problem in received data

hi....

i am using nrf52382 .. segger 15.2version 

here i have attached two programs ble_uart and twi sensor ...  its working fine  but data is received over ble_uart app .. 

see the pic below

why i am getting the data like this ... i am reading the temperature sensor data

Parents Reply
  • see the code below

    static void read_sensor_data()
    {
        m_xfer_done = false;
        uint16_t length1;
     char str[80];
           length1 = sprintf(str,"%d", m_sample);
          NRF_LOG_INFO("tempstr = %s  \r\n",str);
      nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, sizeof(m_sample));
      ble_nus_data_send(&m_nus,str,sizeof(m_sample), m_conn_handle);
         NRF_LOG_INFO("temp = %5d  \r\n", m_sample);
         NRF_LOG_INFO("Data send...");
            NRF_LOG_FLUSH();
    }
    

Children
Related