In the description you say that your BMP280 module is connected to:
SCL to D1, SDA to D2, GND to GND and VCC to VCC.
So I made the assumption that he was I2C.
But in your code you use the pins of a SPI module.
After all, is your module I2C or SPI?
Vin - this is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
3Vo - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
GND - common ground for power and logic
SPI Logic pins:
All pins going into the breakout have level shifting circuitry to make them 3-5V logic level safe. Use whatever logic level is on Vin!
SCK - This is the SPI Clock pin, its an input to the chip
SDO - this is the Serial Data Out / Microcontroller In Sensor Out pin, for data sent from the BMP280 to your processor
SDI - this is the Serial Data In / Microcontroller Out Sensor In pin, for data sent from your processor to the BMP280
CS - this is the Chip Select pin, drop it low to start an SPI transaction. Its an input to the chip
If you want to connect multiple BMP280's to one microcontroller, have them share the SDI, SDO and SCK pins. Then assign each one a unique CS pin.
I2C Logic pins:
SCK - this is also the I2C clock pin (SCL), connect to your microcontroller's I2C clock line.
SDI - this is also the I2C data pin (SDA), connect to your microcontroller's I2C data line.
Are you using these 2 pins for I2S? SCK - this is also the I2C clock pin (SCL), connect to your microcontroller's I2C clock line. SDI - this is also the I2C data pin (SDA), connect to your microcontroller's I2C data line.