logo elektroda
logo elektroda
X
logo elektroda

Wemos D1 mini ESP8266 how to connect two sensors BMP280 and BME280

vanzan1 2730 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19741237
    vanzan1
    Level 8  
    Hi
    Like the subject

    I have a Wemos D1 mini ESP8266 and would like to connect 2 temperature sensors to it.
    Is it possible?
    The sensors are
    BMP280 and BME280

    Individually they work without problem I would like them both to work at once :).

    thanks for your reply.
  • ADVERTISEMENT
  • #2 19741257
    Slawek K.
    Level 35  
    Both sensors can operate over I2C, so as much as possible, you connect to one bus and differentiate the sensors (communication) over different addresses, or over the SPI bus.

    Greetings
  • ADVERTISEMENT
  • #3 19741572
    vanzan1
    Level 8  
    and you could write me how to do it because I am just starting this adventure :) .
    thanks.

    on the Internet I found such a diagram for the connection, after over SPI
    but what to do next :)

    Wemos D1 mini ESP8266 how to connect two sensors BMP280 and BME280
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #5 19741637
    vanzan1
    Level 8  
    I have a Wemos D1 mini ESP8266 and would like to connect 2 temperature sensors BMP280 and BME280 to it.
    ESP with one sensor works as expected.
  • #6 19741671
    tos18
    Level 42  
    with i2c, you connect the sensors together and change the address of one of them, referring to it by its address
    with spi you select the sensor using the csb pin
  • #7 19742518
    khoam
    Level 42  
    vanzan1 wrote:
    Single they work with no problem I would like them both to work at once
    .
    Both sensors have an I2C address of 0x77 when the SDO pin is connected to power or 0x76 when the SDO pin is connected to ground. If you are using off-the-shelf modules with these sensors, you should verify this.
    Arduino libraries for these sensors usually allow you to select the appropriate I2C address - of course, when connecting both sensors to the same I2C bus, you need to make sure that they have different I2C addresses set.

Topic summary

The discussion revolves around connecting two sensors, BMP280 and BME280, to a Wemos D1 mini ESP8266. Both sensors can operate over I2C, and it is possible to connect them on the same bus by assigning different I2C addresses. The BMP280 and BME280 typically have I2C addresses of 0x76 or 0x77, depending on the SDO pin configuration. Users are advised to verify the addresses and ensure that both sensors have distinct addresses when connected to the same I2C bus. Additionally, SPI can be used by selecting the sensor via the CSB pin. Resources and diagrams for wiring and programming are shared to assist beginners.
Summary generated by the language model.
ADVERTISEMENT