TheAustrian / Wemos-D1-Mini-BME280-Weather-Station

Simple Weather Station Code using an ESP8266 and a BME280 sensor. Data is handled via PHP and stored in a MySQL database
157 stars 31 forks source link

Error compiling code #4

Open syrusfem opened 6 years ago

syrusfem commented 6 years ago

Compiling the code in Arduino IDE result in the following error:

" no matching function for call to 'BME280::ReadData(float&, float&, float&, bool, int)'"

I had downloaded the last BME280 libraries and havent changed the code, what could be the problem?

finitespace commented 6 years ago

You are using a newer version of the BME280 library and the prototype for the read function has changed.

The read function currently takes enumerations to the units:

   BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
   BME280::PresUnit presUnit(BME280::PresUnit_Pa);

   bme.read(pres, temp, hum, tempUnit, presUnit);