Hi! I am quite new to arduino and I have come across a problem that I couldn't find a solution to. My circuit has a BME/BMP280 and a WaveShare microsd card. When I connected the BME/BMP280 sensor to the Arduino, it worked normally. The day after, I went to test it again. Upon testing, my code would stop at(in the setup function):
if (!bmp.begin(0x76)){
Serial.println("Could not find a valid BMP280 sensor, check wiring!");
while(1);
}
I attached an image of my wiring. I've been trying to solve this for a while now. Could there be a problem with the sensor? I also tried removing while(1);, but the code still gets stuck there. I have tried running a I2C scanner sketch and It does detect a device at 0x76.
Thanks, but please get out of the habit of updating your previous posts, except for spelling errors, broken links and the like. When posting something new, put it in a new post.
One of the problems with updating previous posts is that it makes replies from other forum members look crazy.
This is something that confuses me. On the physical sensor itself, it says, "BME/BMP280". So far I have been assuming it is a bmp sensor but I cannot find out which one it is. It also says GYBMEP on the back.
It's unlikely that the sensor failed overnight, and the fact that it still gets detected by i2c scanner supports that. Are you certain you changed nothing that could explain the failure?
Maybe you should post some bright, clear photos of your circuit, from above, so that every wire can be traced.
I think you mean on the module's PCB. The PCB is designed to accept either the BMP or BME chip. The chip is tiny! Can you see any writing on it? You may need to use magnification.
We need to know exactly what hardware you have. We need to know what Arduino board (or other brand, such as ESP32) you are using and exactly what other hardware you are connecting it to. The more details we have, the easier it is to help.
If you are using something that is a non-Arduino product then it helps to have a link to its technical data sheet or a link to where you bought it.
Both the BME280 and BMP280 are 3.3V devices. The Uno R3 is a 5V device. Does your breakout board include a 3.3V regulator? Does it include level shifting? Since you haven't told us or shown us what breakout board you're using, we're left to guess. Which just wastes your time, and ours. We'd love to help; please don't make it harder to do so.
That is the issue, I wouldn't be able to identify the breakout board. I did not buy this component myself. Also, I am very new to this, I barely know what a breakout board is. Im sorry. Maybe the image helps? I would be surprised if it did not have a voltage regulator, as it has worked before countless times with 5v.
I decided to remove the 0x76 from :bmp.begin(0x76) and the code stopped getting stuck, and instead could not find the BMP280, not being able to output anything(outputs nan).
I believe it is a bmp280 since it is slightly rectangular. Also, the hole is on the right, whereas the bme280 hole is on the left. Even so, I have been using the BMP28 library.
I managed to solve the issue! Simply including the library for the wrong component(in this case the BME280) seems to break it! Buy removing the #include <Adafruit_BME280.h>, the bmp280 seems to work properly now. I figured this out by going into a more barebones program(shown below), and seeing the differences. I would really love to thank you @PaulRB for trying to help me the best you can! Turns out, it seems to have been a mistake on my part. I would like to apologize for that as well. I would also like to apologize for the inconveniences lol, I am really new to this! Thanks again!