Hi,
Stuck on page 65 with this tutorial about testing BME280 sensor readings. On serial monitor I have: Could not find a valid BME280 sensor, check wiring! I have chenged with other exemplar of BME280, but receive the same. Also checked the adress of BME280, it is: 118 (0x76), also googled about this problem, but not found solution.
I have BME type for either SPI or I2C communication (with 6 pins).
Work with windows version in VSC. Basic comunication with database works.
Any suggestions?
Hi.
Have you tested the sensor with a simple sketch?
Like the one in this tutorial: https://randomnerdtutorials.com/esp32-bme280-arduino-ide-pressure-temperature-humidity/
Just to check that everything is fine with the sensor.
Regards,
Sara
hi, I tested simple sketch also, the same result. Moreover – in this sketch function printValues(); gives error as undefined:
void loop() {
printValues(); // error – undefined
delay(delayTime);
}
When comment this function out – the same output about wrong wiring.
Maybe something wrong with hardware, I will change parts and try once more. đ
I have this board:
https://www.az-delivery.de/en/products/esp-32-dev-kit-c-v4
pins are bit diferent than in your tutorials.
Anyway I was able to read the address of sensor …
You have to set the SDO pin to gnd then you will get readings. Se this https://rntlab.com/question/bme280-faulty-readings/ were I had the same issue. You can get the adress of the sensor 0x76 but you will get no readings. If you get 0x77 you don`t need to set the SDO to ground
//Anders
Hi Anders, I readed about your case, and tried it. Unfortunately it not changed my result.
Just now one more time tried it. Also one more time checked that device address is: 118 (0x76).
Thanks for your answer!
Hi.
If you’re using VS Code, you need to copy the printValues() function before the setup().
The board you’re using should work just fine as long as you use GPIO 22 and GPIO 21 for I2C communication.
Can you show me a picture of your sensor? Are you sure you have a BME280 sensor? Some vendors sell BMP280 instead of BME280. A BMP280 won’t work with BME280 sketches.
To share a picture share a link to imgur, google drive or dropbox, for example.
Regards,
Sara
Hi again.
The sensor is a little different from the ones I have.
So, I’m not sure if it is a “real” BME280 sensor.
Can you try to run an example sketch for the BMP280 just to check if that’s the sensor that you have?
Use the following library:
And use this example: https://github.com/adafruit/Adafruit_BMP280_Library/blob/master/examples/bmp280test/bmp280test.ino
Regards,
Sara
Hi
It was working when I changed in the program “Send_Data_Database_” from <Adafruit_BME280.h> to <Adafruit_BMP280.h> and Adafruit_BME280 bme; to Adafruit_BMP280 bme; and have learned the BMP280 does not deliver any pressure.
Now I’ve been trapped on page 138 for some time.
When entering http: // localhost: 5000 I do not get the page âESP IoT Firebase APPâ but âindex.htmlâ is displayed in full in the browser.
What’s wrong, what did I do wrong?
Thanks for your answer!
Â
Hi.
Do you have all the files in the project folder (see page 131)?
Did you copy the HTML provided to the index.html file?
Did you run the following command?
firebase serve --only hosting
What did you get in response?
Regards,
Sara
Hi,Â
Visual Studio shows this:
FIREBASE-PROJECT
Public
404html
index.html
logo.png
scripts
js auth.js
js index.js
.firebaserc
.gitignore
database.rules.json
firebase.json
I did > Download index.html file
did configuration in the highlighted lines in a different color.
I did > Terminal > New Terminal. Then, run the following command. firebase serve –only hosting
something like this turned up > hosting: local server http://localhost:5000
when i set http://localhost:5000 the same happend as if i would have executed
Download index.html file
BUT NOW AFTER TRYING AGAIN today this turns up
PS C:\Users\Hartmut\Documents\A_Firebase_ESP_32_8266\Firebase-Project> firebase
serve –only hosting
Error: Failed to make request to https://firebase-public.firebaseio.com/cli.jsonPS C:\Users\Hartmut\Documents\A_Firebase_ESP_32_8266\Firebase-Project>
Thank you
Regards
Hartmut
Hi.
It seems related to this: https://github.com/firebase/firebase-tools/issues/2927
A workaround for this issue is to deploy your project instead of creating a local server.
So, run the following command instead:
firebase deploy
It will return a URL where you can access the web page app.
Regards,
Sara
Hi, Sara,
Would it be possible that various scan bots can try attack ESP32 communication instead of Firebase? Is this safe arhitecture?
Hi.
What do you mean?
If you’re worried about security, you can use SSL certificate with ESP32.
It is described on the ESP Firebase Client library how to do that.
For server SSL authentication by providing the server root certificate.
Server SSL certificate verification is the process to ensure that the server that client is being connected is a trusted (valid) server instead of fake server.
The Google’s GlobalSign R2 root certificate can be download from https://pki.goog/repository/
Select the .PEM (base-64 encoded string) or .DER (binary) file to download.
From the test as of July 2021, GlobalSign Root CA was missing from Google server, the certificate chain, GTS Root R1 can be used instead of root certificate.
Here’s the link: https://github.com/mobizt/Firebase-ESP-Client
Regards,
Sara
I know this is an old post, but I had the same problem with “cheapie” BMP280s I bought (they cost 1/5 the price of BME280s I bought – $2 versus $10 . Note that the P means it measures only Temp + Pres, while the E means it also measures Humidity).Â
The issue with the cheapies is that the chipID is not 0x60, which is what the #include <Adafruit_BME280.h>” library will look for and return a status of False. The cheapies have chipID = 0x58, which according to the spec for all these devices, is an ID for the “mass production” version of the chip. (samples given to developers have ID = 0x56 or 0x57)
So, what I did to use these cheapies is to modify a file in the Adafruit_BME280_library, specifically the Adafruit_BME280.cpp file. You need to change the command in the init() function from if (_sensorID != 0x60) to if (_sensorID != 0x58).  It then works fine.
A solution is to change the command to: if(_sensorID != 0x60 and _sensorID != 0x58) … however, this does change the Adafruit BME280 library. A more perfect solution is building a new library, which isn’t hard if you know what you’re doing đ … .depends on how badly you want to use these cheapies ! (I’m not a “proper software” person, so there is no doubt a better way to accommodate these cheapie chips). Â
Maybe you have a BMP280.
See this article: https://randomnerdtutorials.com/solved-could-not-find-a-valid-bme280-sensor/#fake-bme280
Regards,
Sara
Hi Sara … yes I specifically bought BMP’s … at the price of 1/5 of the BME’s … what I didn’t know was that there was a different library for the P’s versus the E’s, and on using the E’s library, it took me a while to figure out that the P’s were not being initialized because of the chipID being different from the E’s. Changing the code in the E library fixed the problem. Thanks for the clarification on this – I downloaded the E library per your tutorial, and will use that instead đ