Closed zachfi closed 6 years ago
I have Heltec WiFi_Kit_32 and a cheap BME280 from eBay. I2C pins are 21,22. Since ESP32 implements I2C in hardware, there's no need to specify in library. i2c_scanner says the I2C address of my sensor is 0x76 instead of 0x77. Successful scanner return also indicates hardware wiring is correct. The problem seems to be https://github.com/adafruit/Adafruit_BME280_Library/blob/4a84ebc99e5fbda1050a3c4843ad349ed60d53ca/Adafruit_BME280.cpp#L92-L93 that asserts chipID must be 0x60. The other guy's library allows both 0x60 and 0x58, and my sensor is detected correctly. (although the readings are all wrong, and I'm still investigating)
this isnt a library issue, its a hardware issue. please contact your ebay seller for support
@ladyada I think I purchased the BME280 from Adafruit. @yoursunny got theirs from Ebay. I have issues with reliability when codiing. Sometimes, the I2C device is not detected, and sometimes it is. When the code does run, sometimes it just stops at some point and I have to restart the device.
xaque - you can post in the adafruit forums for tech support but we know that esp32 i2c has some bugs and is not stable as other chipsets :)
Okay cool. I'll have a look over the forums. Thanks @ladyada. There is also https://github.com/espressif/arduino-esp32/issues/741
I have Heltec WiFi_Kit_32 and a cheap BME280 from eBay. I2C pins are 21,22. Since ESP32 implements I2C in hardware, there's no need to specify in library. i2c_scanner says the I2C address of my sensor is 0x76 instead of 0x77. Successful scanner return also indicates hardware wiring is correct. The problem seems to be
Adafruit_BME280_Library/Adafruit_BME280.cpp
Lines 92 to 93 in 4a84ebc
if (read8(BME280_REGISTER_CHIPID) != 0x60) return false; that asserts chipID must be 0x60. The other guy's library allows both 0x60 and 0x58, and my sensor is detected correctly. (although the readings are all wrong, and I'm still investigating)
ALSO: Tested using TTGO SX1276 LoRa ESP32 Bluetooth WI-FI Internet The BME280 is an important 3 in one sensor for Lora use-cases and it needs to use I2C because on TTGO and Heltec boards (I am evaluating) SX1276 and OLED displays use other pins.ESP
I have several authentic Adafruit BME280 boards now. This library works unchanged.
The unit from eBay appears to be BMP280 and it never worked. I got a refund.
Hi, In trying to use this library with a new esp32 dev board, I'm unable to read a connected bme280. This library says i2c just works, but nothing about which pins to use, and maybe this is my issue.
I'd like to be able to use the example to know if I can read the data from the sensor.
I'm currently using Wire 22 and Wire 21 from this diagram. Is this correct? Icant get the code past the wiring check. Please advise.
https://github.com/espressif/arduino-esp32/blob/master/docs/esp32_pinmap.png
Cheers.