Issue with gy-bmp280-3.3 sensor

I got this off Ali express:

I’m using the Adafruit_BMP280 library.

However, the naming on my sensor dont match the one on the Adafruit one, so i’m not sure how it connects to the Photon?

I have:

I’m connecting it as follows:
VCC to 3V
SCL to D1
SDA to D0
CSB to A2
SDO to A4

However, when I turn on using the example from the library: bmp280.ino I get error message:
Could not find a valid BMP280 sensor, check wiring!

Any suggestions on how to connect the sensor?

If you are using it in SPI mode, you need


And for I2C you should leave CSB floating (internally pulled up via 10k)

Having the same problem. Someone suggested upgrading to 6.0 which I did. Here’s a jpg of my configuration

Ok got it finally!

Thing was to turn on SPI mode in the code, and rem out the I2C mode:

#define BMP_CS A2
#define BMP_SCK A3
#define BMP_MISO A4
#define BMP_MOSI A5 

//Adafruit_BMP280 bmp; // I2C
Adafruit_BMP280 bmp(BMP_CS); // hardware SPI
//Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO, BMP_SCK);

That’s how it’s configured, thanks

1 Like

My bmp280 signals are marked
CS-> A5

Then either the pins are marked wrong, or you are using soft SPI, since HW SPI has the Clock on A3, MISO on A4 and MOSI on A5.

1 Like

My error CLK does go to A3. Reconfirmed wiring but still getting same error(cannot find a valid BMP280)

#define BMP_CS A2
#define BMP_SCK A3
#define BMP_MISO A4
#define BMP_MOSI A5

Hi @dbru

Particle has hardware SPI, so you can’t change the pins used easily. You should hook it up as the above defines show in order for it to work. So for instance, you can’t use A5 for CS; it is already define in the hardware to be MOSI.

Ok but maybe I’m missing something so here’s a jpg of the back of bmp280
And this is the way I’ve wired it
The other thing that’s confusing is that your using names like mosi and miso while my bmp280 has sdo and sdI.

The tutorial on adafruit helps a lot:

SCK - This is the SPI Clock pin, its an input to the chip

SDO - this is the Serial Data Out / Master In Slave Out pin (MISO), for data sent from the BMP183 to your processor

SDI - this is the Serial Data In / Master Out Slave In pin (MOSI), for data sent from your processor to the BME280

CS - this is the Chip Select pin, drop it low to start an SPI transaction. Its an input to the chip

1 Like

Thanks, it helped explain things but still experiencing same problem. Will try to hook it up in I2C mode. Although it seems like one person was successful in configuring it in SPI mode.

Sounds like you succeeded in getting it going what version of firmware are you running?

Hi All…
I dont know if it helps, but I had a rough time with the Adafruit libraries/ I2C / BME280 with a ESP8266. It seems the library header has the address hard coded at 0x77 and my boards were at 0x76. To spite the change I made to the header, I still couldnt get it to work. Before I pilllaged though the code, I for the heck of it tried the Sparkfun library, and the sensor started right up. I think maybe the Adafruit had the address hard coded somewhere else, but I never bothered to look. Hope it helps someone…

1 Like

My50 cent: for I2C the address hard coded in the Lib “Adafruit_BME280.h” in Line 32:
#ifndef BME280_ADDRESS
#define BME280_ADDRESS (0x77)

While it is true that the library has got 0x77 as default I2C address, the library still supports alternative ones via the dedicated parameter of

        bool  begin(uint8_t addr                  = BME280_ADDRESS);

Only if you don’t pre-define BME280_ADDRESS and omit the paramenter, the default 0x77 will be used, otherwise, whatever you pass in.

BTW, since I saw this frequently before, the common saying would be “my two cents” - “50 Cent” is a rapper :wink:

1 Like