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

How to read temperature sensor data on nrf52 thingy?

Hi, I have nrf52 Thingy board and i want to read temperature sensor data using twi sensor example available in SDK 11. I am not able to get data.

Thanks

Parents Reply Children
  • Hi,

    You can use the function

    /**@brief Function for getting the temperature data.
     *
     * @param[out] p_temperature    Content of temperature registers.
     *
     * @return NRF_SUCCESS    If the call was successful.
     */
    uint32_t drv_lps22hb_temperature_get(uint16_t * p_temperature);

    to read from the temperature sensor. You should then be able to use app_uart_put() & app_uart_get() to transfer a byte over the uart (see link). In addition, this link might be useful if you want to add a timer to measure the temperature in a given time interval.

Related