last week I got my first Photon and I wanted it to hook up with the (relatively new) Adafruit BME280 humidity, barometric pressure & temp sensor. Since I could not found any library working with Photon in combination with the BME280 sensor I stated looking into the Arduino Adafruit BME280 library. I ported that library to make it work with the Photon.
Adafruit BME280 library for Photon: https://github.com/mhaack/Adafruit_BME280_Library
All wiring options supported by the sensor (I2C & SPI) are working with that library. For using theses see the sample app, I2C is used by default the others are commented out in the sample code. I ported the Adafruit library because it has the most flexibility in therms or wiring. If you Google you find other libraries for the BME280 sensor but most of them only support I2C protocol.
Any suggestions are welcome.