Connecting BME280 to ESP8266

Hello,

I'm new and I need help. I don't know how to connect BME280 to ESP8266(WeMos D1 mini) via SPI.
I know I should do this like that:
SCK (SPI Clock) GPIO 14
SDO (MISO) GPIO 12
SDI (MOSI) GPIO 13
CS (Chip Select) GPIO 15

I have problem with GPIO15, pinout reference says that input needs to be pulled to GND. I have read that it needs resistor to work or it will never boot up(bcs its need 0 to boot up).
This is my solution:

Bez tytułu

Will it work?
Guys, help me pls and sorry for my poor english.

PS.
I have to use SPI bcs I'm already using I2C to connect DHT22.

I2C is a shared bus. You can put several devices on it.

But I have to admit that I'm unaware of a DHT22 with an I2C interface. Do you have a link to this device? I know there's the AM2320; is that what you meant?

1 Like

I was thinking about AM2302. This is how I wanted to use it with my ESP: ESP8266 DHT11/DHT22 Web Server Arduino IDE | Random Nerd Tutorials.

I didn't know I can use I2C with multiple devices. I created new schemat, can you tell me will it work?

Thanks for help!

A DHT is not an I2C device. So you can not combine it with another I2C device on the bus (I2C pins). You can only combine I2C devices on the I2C bus if the pins are used for I2C.

Your schematic in the opening post might work (I think it will but I'm not deep into ESP8266). The easy test is to built it (on e.g. a breadboard) and test.

Pulling D8 / CS low will, as far as I understand it, put the BME280 in SPI mode. But I have never used the BME280

It is already on a Wemos D1 mini !

Also the CS pin is the one pin that can actually be chosen freely on the board and the one that gets passed to the object using SPI on initialization.

You are right my DHT is not I2C device it's probably 1 wire connection(if I'm wrong please correct me). So my idea now is very simple and I want to ask you will it work???

To be everything more simple I decided to connect BME280 over I2C(GPIO4 and GPIO5) and DHT22 as 1-wire connection to GPIO14. Screenshot below to show what I want to do:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.