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

Use temperature in Eddystone (TLM)

Hello Everyone,

How could I use the temperature from nrf_temp.h in the Eddystone (TLM) example?

Eddystone (TLM) example:

<nRF5_SDK_v11_0_0 folder>\examples\ble_peripheral\experimental_ble_app_eddystone\

Thanks!

Parents
  • Thanks, that is what i have looking for. Now, I want to send the temperature. Therefore, I have to make 8.8 fixed-point notation (courses.cit.cornell.edu/.../). I have try it, but it does not work. I have program following code:

    int32_t	temp;
    float	temp_f;
    int 	temp_i;
    
    sd_temp_get(&temp);			//get temperature
    
    temp_f =  (((float) temp) / 4);		//temperature from 0.25 degrees Celsius to 1 degrees Celsius
    
    temp_i = ((int)((temp_f)*256.0)); 	//Convert float to fix
    

    Maybe you could help me a second time. Thanks.

Reply
  • Thanks, that is what i have looking for. Now, I want to send the temperature. Therefore, I have to make 8.8 fixed-point notation (courses.cit.cornell.edu/.../). I have try it, but it does not work. I have program following code:

    int32_t	temp;
    float	temp_f;
    int 	temp_i;
    
    sd_temp_get(&temp);			//get temperature
    
    temp_f =  (((float) temp) / 4);		//temperature from 0.25 degrees Celsius to 1 degrees Celsius
    
    temp_i = ((int)((temp_f)*256.0)); 	//Convert float to fix
    

    Maybe you could help me a second time. Thanks.

Children
No Data