radhoo / uradmonitor_kit1

A hackable open source sensor IoT board with network interface. A DIY Geiger counter KIT to contribute readings to the uRADMonitor network.
http://www.uradmonitor.com/open-source-uradmonitor-kit1/
GNU General Public License v3.0
78 stars 26 forks source link

in firmware v122, temperature value has only 1 degree resolution #5

Closed twanek closed 7 years ago

twanek commented 7 years ago

i'm not sure if it is from wrong compilation settings, or a bug in the code, but the temperature value is displayed only as int on my device display / local site / server. so, it has only one degree resolution... :(

rateyo commented 7 years ago

Replace the following line in bme280.cpp as shown in order to evaluate the temperatur as floating point.

void BME280::readSensors(float *temperature, uint32_t *pressure, uint8_t *humidity) {

    //*temperature =  (((t_fine * 5 + 128) >> 8) / 100) ;
    *temperature =  ((float)((t_fine * 5 + 128) >> 8) / 100) ;
radhoo commented 7 years ago

fixed in v123