Comments (7)
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
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)
from adafruit_bme280_library.
this isnt a library issue, its a hardware issue. please contact your ebay seller for support
from adafruit_bme280_library.
@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.
from adafruit_bme280_library.
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 :)
from adafruit_bme280_library.
Okay cool. I'll have a look over the forums. Thanks @ladyada. There is also espressif/arduino-esp32#741
from adafruit_bme280_library.
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 beAdafruit_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)
This is the missing information I have been searching for thanks.
I have been trying to get ESP32 I2C to work reliably for days, trying different boards, I2C pins the works.
Not when I remove this line in Adafruit_BME280.cpp it all works..
So you need to make sure you have done the following to et I2C working on ESP32 :
a) Use the correct wiring (duh)
b) Use the default I2C pins SDO_pin 22 and SCK_pin 21
c) status = bme.begin(0x76);
d) Comment out lines in Adafruit_BME280.cpp
//if (read8(BME280_REGISTER_CHIPID) != 0x60)
// return false;
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
from adafruit_bme280_library.
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.
from adafruit_bme280_library.
Related Issues (20)
- Sorry, if this is obvious, but I can't locate the doxygen documentation and theres no link to it in the readme as in other libs HOT 1
- advancedsettings.ino example link URL incorrect HOT 1
- I2C to USB HOT 1
- Adafruit BME280 library does not work on Raspberry Pi Pico - runtime crashes HOT 3
- using in Jetson Nano HOT 2
- bme280test example typo errors HOT 1
- BME280.begin() for I2C allways calls BME280.begin() resetting the I2C interface to default state HOT 1
- To high delay in init() method HOT 3
- begin() Method Corrupts Sensor ID If Not Valid HOT 11
- Isn't while(1); dangerous ? HOT 3
- Version 2.0.1: Examples do not work any more (i2c) HOT 3
- BME280_ADDRESS_ALTERNATE does nothing HOT 1
- Possible hang when using Adafruit_BME280::takeForcedMeasurement() HOT 2
- Compensation algorithm causes high spikes in measures HOT 24
- Software Wire / I2C HOT 3
- Custom Temperature Adjustments HOT 2
- Inaccessible class member functions HOT 5
- Temperature conversion functions HOT 1
- Convert to BusIO usage HOT 1
- sensor_t is not always a valid name when compiling this against ESP8266/ESP32
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_bme280_library.