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
Cs->A5
Sck-A4
Sdo->A3
SdI->A2
The other thing that’s confusing is that your using names like mosi and miso while my bmp280 has sdo and sdI.
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.
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…
Regards,
My50 cent: for I2C the address hard coded in the Lib “Adafruit_BME280.h” in Line 32:
/=========================================================================
I2C ADDRESS/BITS
-----------------------------------------------------------------------/ #ifndef BME280_ADDRESS #define BME280_ADDRESS (0x77) #endif