-->
Page 1 of 1

Need help with BME280 and Wemos D1 Mini

PostPosted: Sun Jun 24, 2018 2:44 am
by chbla
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:

https://gist.github.com/solars/1bebe10d ... 3ea60aa6a6

The output is:

Code: Select allConnecting 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?

Re: Need help with BME280 and Wemos D1 Mini

PostPosted: Sun Jun 24, 2018 3:16 am
by McChubby007
An esp8266 is not an 'Arduino'. If you mean Arduino AVR family then they mostly run at 5v whereas an esp8266 runs at 3.3v, as do its GPIOs.

Re: Need help with BME280 and Wemos D1 Mini

PostPosted: Sun Jun 24, 2018 4:13 am
by torntrousers
That does work on the ESP so its probably just some set up problem. Some BME280's have different I2C addresses, i think by default the Adafruit library uses address 0x77 but some BME280's use 0x76, try the I2C scanner finds - https://playground.arduino.cc/Main/I2cScanner - or just try it - bme.begin(0x76).

Re: Need help with BME280 and Wemos D1 Mini

PostPosted: Sun Jun 24, 2018 5:26 am
by AcmeUK
Do you have pullups on your I2C lines?
See here https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level