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

How can i convert the temperature using sd_temp_get() to an uint8_t?

Hello

I am using the experimental_ble_app_uart for s110. I want to use the sd_temp_get() and convert the temperature value to a uint8_t, but if understand correctly when i do this i only get information from the first bytes of the int32_t and these are not the actual temperature value. I was wondering if someone could help me with this problem. This is part of the code i am using at the moment.

    static int32_t temp;
	uint32_t err_code;
	
	err_code = sd_temp_get(&temp);		
	APP_ERROR_CHECK(err_code);
	
	uint8_t temp1 = temp;
Parents Reply Children
No Data
Related