Need help with BME280 and Wemos D1 Mini

Hi there,

I want to use a BME280 on a Wemos D1 Mini, but somehow can't get it to work.
I've used the BME280 on various arduinos before using the Adafruit lib, but no idea why it isn't working
with the Wemos.

Here is my code:

The output is:

Connecting to casablanca
.
WiFi connected
Could not find a valid BME280 sensor, check wiring!

Soft WDT reset

ctx: cont 
sp: 3ffefb10 end: 3ffefd00 offset: 01b0

>>>stack>>>
3ffefcc0:  3ffe84e0 3ffeea6a 3ffeecac 402025a4  
3ffefcd0:  feefeffe feefeffe feefeffe 3ffeecd8  
3ffefce0:  3fffdad0 00000000 3ffeecd0 40204e3c  
3ffefcf0:  feefeffe feefeffe 3ffeece0 40100710  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset

The pins I use are SDA -> D2, SCL -> D1

Can anyone help me?

The pins I use are SDA -> D2, SCL -> D1

Are those the ONLY pins you use? I'd expect you to tell us about FOUR pins being used.

I use BME280 modules on D1 Mini's and the below snippets are how I get it working. Have you got the correct I2C address for your module?

#include <Wire.h>
#include <Adafruit_BME280.h>

// BME280 Defines
#define SEALEVELPRESSURE_HPA (1013.25)
//#define SDA_PIN 0
//#define SCL_PIN 2
#define BME280_I2C_ADDR 0x76

Adafruit_BME280 bme;


//Wire.begin(SDA_PIN, SCL_PIN);                             // I2C 0=SDA, 2=SCL
Wire.begin();                                               // Default I2C D2=SDA, D1=SCL

bool status = bme.begin(BME280_I2C_ADDR);
if (!status) {
  Serial.println(F("Could not find BME280 sensor, check wiring!"));
  while (1);
}