-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BME280 sensor read Temperature, Humidity, Pressure #353
Comments
Apparently, the firmware is not able to locate any I2C device on that bus. It could be that the wiring is wrong (maybe you changed something) or the bus is noisy. In this second case, you can try enabling I2C_CLEAR_BUS in the sensors.h file. |
Original comment by Stefano Cotterli (Bitbucket: faina09, GitHub: faina09): The wiring is ok: I enabled I2C_CLEAR_BUS but the issue remains, I get the response
|
Original comment by Stefano Cotterli (Bitbucket: faina09, GitHub: faina09): I temporary fixed avoidig sensorSetup(); in setup() of espurna.ini and modifying loop() in the same file as follow:
again, it is not a solution, just a workaround |
Wow, interesting. The BME280 I have does not show this behaviour. Does this mean it needs a warmup time? How long does it take to show up? |
Can you test adding a delay at the end of the i2cSetup() method in the i2c.ino module? |
Original comment by Stefano Cotterli (Bitbucket: faina09, GitHub: faina09): In espurna.ini I
|
I don't understand that there is an error 6 (I2C error in the BMX280 sensor) just after the 0x77 locked... But apparently there is something needed before the sensor is ready and it's not the i2c setup... |
Original comment by Stefano Cotterli (Bitbucket: faina09, GitHub: faina09): The error comes from the first i2cscan, that 'founds' (sic!) a BMP280 at address 0x00.
|
No, i2cScan doesn't find "anything". It just report what addresses look like being used (so there is a device pulling the line at the other end). Then the BMX280 module uses i2cFindFirst to find what address of the possible addresses the sensor may use is actually in use. It finds nothing (maybe the sensor is not yet ready?) and returns address 0 and an error 6 (which means I2C error). What if you try to hardcode the sensor address in the sensors.h file? Look for the BMX280_ADDREESS and set it to 0x77 (instead of 0x00 which means "discover it"). |
Original comment by Stefano Cotterli (Bitbucket: faina09, GitHub: faina09): In the dev branch I found no longer #define BMX280_ADDRESS but it is used in sensor.ino
I try defining it 0x77 but does not work. |
BMX280_ADDRESS is defined in sensors.h. |
Original comment by Hany Info (Bitbucket: hanyinfo, GitHub: hanyinfo): Hi guys, Is there any change see from this same sensor BME280 the values for http, mqtt. I try to compile project, it works fine. Is there Xose some "generic" i2c device? I would see the values some way. Which device to configure? Thank you very much for help.
I have ESP8266 NodeMCU V3 Lua WIFI module + memory 32Mbit Flash |
@hanyinfo you might have to configure the GPIOs you are using for I2C. Check the I2C_SDA_PIN and I2C_SCL_PIN in sensors.h |
Original comment by Hany Info (Bitbucket: hanyinfo, GitHub: hanyinfo): @xoseperez Ok, I will try...thank you |
@hanyinfo Any update on this? |
yes... I tried few minutes ago and I can see the values on status page together with 8 switches. I can see Sensors configuration with temperature. Thanks for help! in hardware.h #elif defined(GENERIC_8CH) #define I2C_SDA_PIN D3 and in arguino.h |
Great. To recap: there is still the issue @fain09 reported. Looks like his BME280 requires some time to warm up before being accessible. I'm receiving another sensor tomorrow. Will try to reproduce the issue. |
With the latest changes in the sensors branch the BMX280Sensor has been tested under pressure, hot-unplugging and plugging it, and it always recovers. |
Originally reported by: Stefano Cotterli (Bitbucket: faina09, GitHub: faina09)
I have a BME280 sensor linked via wire protocol to GPIO0 (SData) and GPIO2 (SClock) and I tested hardware with the following sample code; after this I can read Pressure, Temp and Humidity values from sensor:
In ESPurna I set the following defines:
the i2c bus starts but searches for a BMP280
What is wrong or what I missed in my ESPurna configuration?
The text was updated successfully, but these errors were encountered: