Thingy:53 sensor output to another board using BLE

Hello,

I am working on a project that requires me to use the Thingy:53 as a sensor hub, that reads out data from all the sensors (the IMU, the environment sensor, etc.) to an Nvidia Jetson NX board. I am fine with using UART or BLE, but am confused about how to go about reading out raw data from each of the sensors. I have tried looking around for examples, but none seem to work for my specific usecase.

Requesting guidance on how to interface the Thingy:53 with the Jetson NX board to read out sensor data using BLE or any other protocol that might work.

Regards,

Karthik Lakshmanan

Parents Reply Children
  • Hello!

    I have programmed the Thingy 53 to work as the Sensor hub described in the link you suggested. I tried reading the data using the nRF connect app for mobile, and the values are being updated, but all I see are hex values. How exactly do I interpret them? I can get what sensor gives what hex value from the UUIDs, but what exactly do the hex values that they send correspond to?

    Regards,
    Karthik Lakshmanan

  • I assume you will need to study the sensor documentation for the sensor in question to understand the format. For instance in in the code I can find:

        err = sensor_channel_get(bme688Dev, SENSOR_CHAN_HUMIDITY, &humidity_value);
        if(err)
        {
            printk("Failed to fetch humidity sample");
            return err;
        }
        sensor_hub_update_humidity(m_connection_handle, (uint8_t*)(&humidity_value.val1), sizeof(humidity_value.val1));
     

    If I open bme680.c I can find:

    	case SENSOR_CHAN_HUMIDITY:
    		/*
    		 * data->calc_humidity has a resolution of 0.001 %RH.
    		 * So 46333 equals 46.333 %RH.
    		 */
    		val->val1 = data->calc_humidity / 1000;
    		val->val2 = (data->calc_humidity % 1000) * 1000;
    		break;

    Kenneth

Related