Wemos D1 mini Pro simple weather station (ESP8266, Bosch BME280 and ThingSpeak)

Wemos D1 mini Pro simple weather station (ESP8266, Bosch BME280 and ThingSpeak)


We go to use pin D1 (SCL) and D2 (SDA) Now connect power supply to sensor (3V3 to VIN and GND to GND) Register to ThingSpeak.com and create a new channel We need field for temperature, humidity and air pressure. This is main dashboard with charts builds on captured data. Copy the Write API Key Insert your wifi name (SSID), password and paste your Write API Key to const api_key You can also change the delay between masurements. Compile and upload your sketch into the board. Blinking LED indicates Wemos tries to connect to wifi. Connection is ready and data are uploaded via ThinkSpeak API to server. Here we can check transfered data.

12 thoughts on “Wemos D1 mini Pro simple weather station (ESP8266, Bosch BME280 and ThingSpeak)”

  1. librariesBME280-masterexamplesbme280_testbme280_test.ino:41:25: fatal error: avr/dtostrf.h: No such file or directory

  2. Brilliant, thank you, worked first time.
    Could you please explain what the following means in your code ? (I like to try and understand why things work!)

    void printFormattedFloat(float x, uint8_t precision) {
    char buffer[10];

    dtostrf(x, 7, precision, buffer);
    Serial.print(buffer);

    }

    void printCompensatedMeasurements(void) {

    float temp, humidity, pressure, pressureMoreAccurate;
    double tempMostAccurate, humidityMostAccurate, pressureMostAccurate;
    char buffer[80];

    temp = BME280.getTemperature();
    humidity = BME280.getHumidity();
    pressure = BME280.getPressure();

    pressureMoreAccurate = BME280.getPressureMoreAccurate(); // t_fine already calculated from getTemperaure() above

    tempMostAccurate = BME280.getTemperatureMostAccurate();
    humidityMostAccurate = BME280.getHumidityMostAccurate();
    pressureMostAccurate = BME280.getPressureMostAccurate();

  3. YouTube recently changed the way they monetize my content. My channel now needs 1,000 subscribers so it would be awasome if you could show your support by both watching my videos and subscribing to my channel if you haven't already done so. Monetizing my videos allows me to invest back into the channel with new equipment so a small gesture from you goes huge way for me. Many thanks for your support! 🙂

  4. Hi plukas,i made this project,but have a problem,the station stop to send data at random time,once send data for 2 hours,once send data for 8 hours,once send data for 20 minutes…it is very boring…i use the same board in this video and the data is sending for thingspeak account..sorry for my english…i hope can help me,thanks

  5. Congratulations i'd like the same project but with anemometer it is a simple magnet in front of a read contact that gives the speed of the wind. Could you help me please?

  6. Hello,
    i have error when i compiling,
    In function 'void printCompensatedMeasurements()':

    Wemos_d1_mini:40:21: error: expected primary-expression before '.' token

    temp = BME280.getTemperature();

    ^

    Wemos_d1_mini:41:21: error: expected primary-expression before '.' token

    humidity = BME280.getHumidity();

    ^

    Wemos_d1_mini:42:21: error: expected primary-expression before '.' token

    pressure = BME280.getPressure();

    ^

    Wemos_d1_mini:44:32: error: expected primary-expression before '.' token

    pressureMoreAccurate = BME280.getPressureMoreAccurate(); // t_fine already calculated from getTemperaure() above

    ^

    Wemos_d1_mini:46:32: error: expected primary-expression before '.' token

    tempMostAccurate = BME280.getTemperatureMostAccurate();

    ^

    Wemos_d1_mini:47:32: error: expected primary-expression before '.' token

    humidityMostAccurate = BME280.getHumidityMostAccurate();

    ^

    Wemos_d1_mini:48:32: error: expected primary-expression before '.' token

    pressureMostAccurate = BME280.getPressureMostAccurate();

    ^

    C:UsersSteffenDocumentsArduinoWemos_d1_miniWemos_d1_mini.ino: In function 'void loop()':

    Wemos_d1_mini:134:9: error: expected unqualified-id before '.' token

    BME280.readCompensationParams();

    ^

    Wemos_d1_mini:137:9: error: expected unqualified-id before '.' token

    BME280.writeStandbyTime(tsb_0p5ms); // tsb = 0.5ms

    ^

    Wemos_d1_mini:138:9: error: expected unqualified-id before '.' token

    BME280.writeFilterCoefficient(fc_16); // IIR Filter coefficient 16

    ^

    Wemos_d1_mini:139:9: error: expected unqualified-id before '.' token

    BME280.writeOversamplingPressure(os16x); // pressure x16

    ^

    Wemos_d1_mini:140:9: error: expected unqualified-id before '.' token

    BME280.writeOversamplingTemperature(os2x); // temperature x2

    ^

    Wemos_d1_mini:141:9: error: expected unqualified-id before '.' token

    BME280.writeOversamplingHumidity(os1x); // humidity x1

    ^

    Wemos_d1_mini:143:9: error: expected unqualified-id before '.' token

    BME280.writeMode(smNormal);

    ^

    Wemos_d1_mini:147:18: error: expected primary-expression before '.' token

    while (BME280.isMeasuring()) {

    ^

    Wemos_d1_mini:153:11: error: expected unqualified-id before '.' token

    BME280.readMeasurements();

    ^

    Wemos_d1_mini:159:3: error: expected '}' at end of input

    }

    ^

  7. Hello from Belgium I have problème when uploading sketch on wemosD1mini pro. I have error message Uploading 241072 bytes from C:UsersdidierAppDataLocalTemparduino_build_920296/wemos_bme280.ino.bin to flash at 0x00000000??
    Could you help me?
    Congratulations and thank you very much for charing.

Leave a Reply

Your email address will not be published. Required fields are marked *