Giter VIP home page Giter VIP logo

Comments (2)

pasko-zh avatar pasko-zh commented on June 25, 2024

Hello!

If you have questions you can either ask them here, or contact me via PM. I prefer the former, so that also others can read question and (my) answers.

So, I am trying to understand your question.

Usually, one is connecting sensors as slaves to the i2c bus and the esp8266 has the role af an i2c master, i.e. the i2c master.

You can only connect up to two BME280 on the same i2c bus, since according to the datasheet page 31, you can only set LSB of the slave address, resulting in either 0x76 or 0x77.

So, I am bit confused when you write "to read temperature from BME280 (I2C Master)", since a BME280 cannot be an i2c master, it only supports being an i2c slave.

  1. Would you like to have several i2c buses with one esp8266, such that you can use more than two BME280?
  2. When you write "Some BME280 are not always working properly", do you use some BME280 breakout boards, e.g., from Adafruit?
    And what is the size of your i2c pullup resistors?
    Which i2c multiplexer are you using?
    Does the problem persist, when you connect the BME280 without the i2c multiplexer, i.e. directly to the i2c?

from brzo_i2c.

cmoine avatar cmoine commented on June 25, 2024

Hi, I am very sorry for the very late reply.

Let me rephrase what I would like to do (not sure whether it good idea, but anyway, it is not a all working anymore with the I2C Multiplexer):

  • I have a Raspberry that discuss with several Arduino slave using I2C. So far so good.
  • The Arduino (Nano) is responsible for commanding relay, reading a sensor to know if the window is open, AND I would like to read BME280 values.

The Arduino Nano is already an I2C slave, so it cannot additionnally be a I2C master for the BME280 sensor.

Why not puting the BME on the same I2C with different address ? Becasue I have several Arduino, and I want to keep them isolated, without the I2C Multiplexer which doesn't work :/ Or maybe it is Raspberry PI + Multiplexer that doesn't work properly, no clue....

Why not using SPI ? just because my 4 BME280 sensors have only I2C pins exposed :/

Problem with newer version of BRZO? it doesn't work anymore with Arduino:

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:52:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_write'

 void ICACHE_RAM_ATTR brzo_i2c_write(uint8_t *data, uint32_t no_of_bytes, bool repeated_start)

                      ^

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:367:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_read'

 void ICACHE_RAM_ATTR brzo_i2c_read(uint8_t *data, uint32_t nr_of_bytes, bool repeated_start)

                      ^

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:752:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_ACK_polling'

 void ICACHE_RAM_ATTR brzo_i2c_ACK_polling(uint16_t ACK_polling_time_out_usec) {

                      ^

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:989:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_start_transaction'

 void ICACHE_RAM_ATTR brzo_i2c_start_transaction(uint8_t slave_address, uint16_t SCL_frequency_KHz)

                      ^

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:1023:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_end_transaction'

 uint8_t ICACHE_RAM_ATTR brzo_i2c_end_transaction()

                         ^

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:1041:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_setup'

 void ICACHE_FLASH_ATTR brzo_i2c_setup(uint8_t sda, uint8_t scl, uint32_t clock_stretch_time_out_usec)

                        ^

C:\Users\Christophe Moine\Documents\Arduino\libraries\Brzo_I2C\brzo_i2c.c:1105:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'brzo_i2c_reset_bus'

 void ICACHE_FLASH_ATTR brzo_i2c_reset_bus()

                        ^

exit status 1
Error compiling for board Arduino Nano.```

from brzo_i2c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.