bme 280, read humidity
응답
19. 7. 15 오전 4:44
We checked the bme 280 datasheet and found that the resolution of the humidity was 0.008.

Can I read the decimal point when reading the humidity value?

For example, 55.6% rh
0 (0 투표)
RE: bme 280, read humidity
응답
19. 7. 16 오전 8:45 as a reply to jang.

Hello Jang,

The BME280 library returns unsigned 32 bit humidity value in Q22.10 format (means an output value of 42313 represents 42313 / 1024 = 41.321 %rH)  But in platform file, SDK/xdk110/Platform/Sensors/source/Environmental/Environmental.c only the integer part of the humidity value is retained.

If you want to get float values for humudity, changes are required in the datatype of the humidity value used in Environmental_readData() API which is passed on to application.

Thanks,

Lavanya S P

+1 (1 투표)
RE: bme 280, read humidity
응답
19. 7. 19 오전 12:05 as a reply to Lavanya S Palanisamy.
Please let me know how can change it.
0 (0 투표)
RE: bme 280, read humidity
응답
19. 7. 26 오전 5:16 as a reply to jang.

Hi Jang,

You can do it in 2 ways.

The BME280 library API bme280_read_pressure_temperature_humidity() returns humidity value as 42313 for 41.321% RH for example (The conversion is 42313/1024 = 41.321 %RH).

  • You can call this library API directly (or)
  • In Platform/Sensors/source/Environmental/Environmental.c, Environmental_readData() calls the BME280 library API bme280_read_pressure_temperature_humidity() to get the float value and assign it to the humidity variable(unsigned 32 bit int) in Environmental_DataPtr_T which is returned from the API. So you have to change the data type of Environmental_DataPtr_T ->humidity from uint32_t to float.

Hope this helps.

Thanks,

Lavanya S P

0 (0 투표)