Published © Apache-2.0

Temperature, pressure and humidity measurement with BME28...

You will create an application for smartphone, where you can read the measurements from BME280 sensor (including history as graph).

BeginnerProtip30 minutes324
Temperature, pressure and humidity measurement with BME28...

Things used in this project

Hardware components

SparkFun Atmospheric Sensor Breakout - BME280
SparkFun Atmospheric Sensor Breakout - BME280
×1
Wemos D1 Mini
Espressif Wemos D1 Mini
×1

Software apps and online services

RemoteMe.org cloud
RemoteMe.org cloud

Story

Read more

Code

Code snippet #1

Plain text
void loop() {
    remoteMe.loop();
    static long time=0;
    if (time+10000<millis()){
      time=millis();
      sendData();
    }
}

Code snippet #2

Plain text
void sendData(){
  double temp[10];
  double pressure[10];
  double humm[10];
  for(int i=0;i<9;i++){
    temp[i]= mySensor.readTempC();
    pressure[i]= mySensor.readFloatPressure();
    humm[i]= mySensor.readFloatHumidity();
    delay(100);
  }
 
  sort(temp,10);
  sort(humm,10);
  sort(pressure,10);
 
 
  setHumm(round(humm[5]));
  setPress(round(pressure[5]/100));
  setTemp(round(temp[5]));
 
}

Credits

Comments