I edited the example code to make it work better for you.
SYSTEM_MODE(MANUAL); will not connect you to the Particle Cloud, default is
You do not need
#include “Adafruit_Sensor.h” since this is included already in the Adafruit_BME280.h file.
#define BME_SCK D4 #define BME_MISO D3 #define BME_MOSI D2
Are not required (and the values are wrong for hardware SPI).
#define BME_CS D5 this is the pin your board SS/CS pin is attached to?
Adafruit_BME280 bme; // I2C //Adafruit_BME280 bme(BME_CS); // hardware SPI
//Adafruit_BME280 bme; // I2C Adafruit_BME280 bme(BME_CS); // hardware SPI
Because you are using hardware SPI interface and not I2C. You will need to re-compile and then flash.