TEConnectivity / Weather_Shield_Arduino_Library

Arduino library for the Weather Shield
MIT License
4 stars 5 forks source link

Value error #2

Closed kakaducsy closed 6 years ago

kakaducsy commented 6 years ago

ESP8266 node mcu read

TE Connectivity Sensor Solutions ==== Arduino Weather Shield ==== ============ MS5637 ============ -Temperature : 27.3⸮C -Pressure : 1016.4 hPa ============ MS8607 ============ -Tempeature : 27.47⸮C -Pressure : 1017.26 hPa -Humidity : 1016.42%RH ============ TSYS01 ============ -Temperature : 27.6⸮C ============ TSD305 ============ -Temperature : 27.3⸮C -Object Temperature : 27.7⸮C ============ HTU21D ============ -Temperature : 27.9⸮C -Humidity : 45.7 %RH

And arduino uno read

============ HTU21D ============ -Temperature : 28.9⸮C -Humidity : 42.8 %RH ============ MS5637 ============ -Temperature : 28.7⸮C -Pressure : 1016.8 hPa ============ MS8607 ============ -Tempeature : 28.80⸮C -Pressure : 1017.78 hPa -Humidity : 43.19%RH ============ TSYS01 ============ -Temperature : 28.7⸮C ============ TSD305 ============ -Temperature : 28.1⸮C -Object Temperature : 28.5⸮C

at the same time, at the hardware --> different reading values Special :

============ MS8607 ============ -Humidity : 1016.42%RH

And

============ MS8607 ============ -Humidity : 43.19%RH

kakaducsy commented 6 years ago

I fixed :+1: edit lib ms8607.cpp at function :

ms8607::hsensor_humidity_conversion_and_read_adc

add function delay

if (hsensor_i2c_master_mode == ms8607_i2c_hold) { Wire.write(HSENSOR_READ_HUMIDITY_W_HOLD_COMMAND); i2c_status = Wire.endTransmission(); delay(hsensor_conversion_time); } else { Wire.write(HSENSOR_READ_HUMIDITY_WO_HOLD_COMMAND); i2c_status = Wire.endTransmission(); // delay depending on resolution delay(hsensor_conversion_time); }