user14790: My goal is to measure temperature, pressure and humidity using my Arduino Nano and the BME280 (GY-BME/P280).


To do this I use this library from SparkFun and that works almost. What I notice is probably invalid values for temperature and no humidity values at all.
The PINs:

GND -> GND
VCC -> 3.3V
SDO -> D12
CSB -> D10
SDA -> D11
SCL -> D13

I have noticed that I can unplug the VCC pin, it makes to difference to the measurements. I find that odd.
And I have noticed that the results are the same for 5V to VCC.
This is the result, I have tested this with I2C and SPI, it's the same:
Program Started
Starting BME280.Program Started
Starting BME280... result of .begin(): 0x58
Displaying ID, reset and ctrl regs
ID(0xD0): 0x58
Reset register(0xE0): 0x0
ctrl_meas(0xF4): 0x27
ctrl_hum(0xF2): 0x0


Displaying all regs
0x80:9A 70 90 28 92 2D AF 00 76 6F 7D 67 32 00 93 8C 
0x90:C1 D6 D0 0B CF 18 AD FF F9 FF 8C 3C F8 C6 70 17 
0xA0:00 45 82 00 00 00 00 00 00 00 00 00 33 00 00 C0 
0xB0:00 54 00 00 00 00 60 02 00 01 FF 82 13 4E 08 00 
0xC0:00 87 27 FF 00 00 00 00 00 00 00 00 00 00 00 00 
0xD0:58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0xE0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0xF0:00 00 00 0C 27 00 00 58 DD 00 82 72 00 00 00 00 


Displaying concatenated calibration words
dig_T1, uint16: 28534
dig_T2, int16: 26493
dig_T3, int16: 50
dig_P1, uint16: 35987
dig_P2, int16: -10559
dig_P3, int16: 3024
dig_P4, int16: 6351
dig_P5, int16: -83
dig_P6, int16: -7
dig_P7, int16: 15500
dig_P8, int16: -14600
dig_P9, int16: 6000
dig_H1, uint8: 69
dig_H2, int16: 0
dig_H3, uint8: 0
dig_H4, int16: 0
dig_H5, int16: 0
dig_H6, uint8: 0

Temperature: 24.59 degrees C
Temperature: 76.26 degrees F
Pressure: 101121.63 Pa
Altitude: 18.25m
Altitude: 59.87ft
%RH: 0.00 %

My script is almost exactly like the example from the library.
/******************************************************************************
I2C_ReadAllData.ino
BME280 Arduino and Teensy example
Marshall Taylor @ SparkFun Electronics
May 20, 2015
https://github.com/sparkfun/SparkFun_BME280_Arduino_Library

This sketch configures the BME280 to read all measurements.  The sketch also
displays the BME280's physical memory and what the driver perceives the
calibration words to be.

Resources:
Uses Wire.h for I2C operation
Uses SPI.h for SPI operation

Development environment specifics:
Arduino IDE 1.6.4
Teensy loader 1.23

This code is released under the [MIT License](http://opensource.org/licenses/MIT).
Please review the LICENSE.md file included with this example. If you have any questions 
or concerns with licensing, please contact techsupport@sparkfun.com.
Distributed as-is; no warranty is given.
******************************************************************************/

#include <stdint.h>
#include "SparkFunBME280.h"
//Library allows either I2C or SPI, so include both.
#include "Wire.h"
#include "SPI.h"

//Global sensor object
BME280 mySensor;

void setup()
{
  //***Driver settings********************************//
  //commInterface can be I2C_MODE or SPI_MODE
  //specify chipSelectPin using arduino pin names
  //specify I2C address.  Can be 0x77(default) or 0x76

  //For I2C, enable the following and disable the SPI section
  //mySensor.settings.commInterface = I2C_MODE;
  //mySensor.settings.I2CAddress = 0x76;

  //For SPI enable the following and dissable the I2C section
  mySensor.settings.commInterface = SPI_MODE;
  mySensor.settings.chipSelectPin = 10;


  //***Operation settings*****************************//

  //renMode can be:
  //  0, Sleep mode
  //  1 or 2, Forced mode
  //  3, Normal mode
  mySensor.settings.runMode = 3; //Normal mode

  //tStandby can be:
  //  0, 0.5ms
  //  1, 62.5ms
  //  2, 125ms
  //  3, 250ms
  //  4, 500ms
  //  5, 1000ms
  //  6, 10ms
  //  7, 20ms
  mySensor.settings.tStandby = 0;

  //filter can be off or number of FIR coefficients to use:
  //  0, filter off
  //  1, coefficients = 2
  //  2, coefficients = 4
  //  3, coefficients = 8
  //  4, coefficients = 16
  mySensor.settings.filter = 0;

  //tempOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
  mySensor.settings.tempOverSample = 1;

  //pressOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
    mySensor.settings.pressOverSample = 1;

  //humidOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
  mySensor.settings.humidOverSample = 1;

  Serial.begin(57600);
  Serial.print("Program Started\n");
  Serial.print("Starting BME280... result of .begin(): 0x");

  //Calling .begin() causes the settings to be loaded
  delay(10);  //Make sure sensor had enough time to turn on. BME280 requires 2ms to start up.
  Serial.println(mySensor.begin(), HEX);

  Serial.print("Displaying ID, reset and ctrl regs\n");

  Serial.print("ID(0xD0): 0x");
  Serial.println(mySensor.readRegister(BME280_CHIP_ID_REG), HEX);
  Serial.print("Reset register(0xE0): 0x");
  Serial.println(mySensor.readRegister(BME280_RST_REG), HEX);
  Serial.print("ctrl_meas(0xF4): 0x");
  Serial.println(mySensor.readRegister(BME280_CTRL_MEAS_REG), HEX);
  Serial.print("ctrl_hum(0xF2): 0x");
  Serial.println(mySensor.readRegister(BME280_CTRL_HUMIDITY_REG), HEX);

  Serial.print("\n\n");

  Serial.print("Displaying all regs\n");
  uint8_t memCounter = 0x80;
  uint8_t tempReadData;
  for(int rowi = 8; rowi < 16; rowi++ )
  {
    Serial.print("0x");
    Serial.print(rowi, HEX);
    Serial.print("0:");
    for(int coli = 0; coli < 16; coli++ )
    {
      tempReadData = mySensor.readRegister(memCounter);
      Serial.print((tempReadData >> 4) & 0x0F, HEX);//Print first hex nibble
      Serial.print(tempReadData & 0x0F, HEX);//Print second hex nibble
      Serial.print(" ");
      memCounter++;
    }
    Serial.print("\n");
  }


  Serial.print("\n\n");

  Serial.print("Displaying concatenated calibration words\n");
  Serial.print("dig_T1, uint16: ");
  Serial.println(mySensor.calibration.dig_T1);
  Serial.print("dig_T2, int16: ");
  Serial.println(mySensor.calibration.dig_T2);
  Serial.print("dig_T3, int16: ");
  Serial.println(mySensor.calibration.dig_T3);

  Serial.print("dig_P1, uint16: ");
  Serial.println(mySensor.calibration.dig_P1);
  Serial.print("dig_P2, int16: ");
  Serial.println(mySensor.calibration.dig_P2);
  Serial.print("dig_P3, int16: ");
  Serial.println(mySensor.calibration.dig_P3);
  Serial.print("dig_P4, int16: ");
  Serial.println(mySensor.calibration.dig_P4);
  Serial.print("dig_P5, int16: ");
  Serial.println(mySensor.calibration.dig_P5);
  Serial.print("dig_P6, int16: ");
  Serial.println(mySensor.calibration.dig_P6);
  Serial.print("dig_P7, int16: ");
  Serial.println(mySensor.calibration.dig_P7);
  Serial.print("dig_P8, int16: ");
  Serial.println(mySensor.calibration.dig_P8);
  Serial.print("dig_P9, int16: ");
  Serial.println(mySensor.calibration.dig_P9);

  Serial.print("dig_H1, uint8: ");
  Serial.println(mySensor.calibration.dig_H1);
  Serial.print("dig_H2, int16: ");
  Serial.println(mySensor.calibration.dig_H2);
  Serial.print("dig_H3, uint8: ");
  Serial.println(mySensor.calibration.dig_H3);
  Serial.print("dig_H4, int16: ");
  Serial.println(mySensor.calibration.dig_H4);
  Serial.print("dig_H5, int16: ");
  Serial.println(mySensor.calibration.dig_H5);
  Serial.print("dig_H6, uint8: ");
  Serial.println(mySensor.calibration.dig_H6);

  Serial.println();
}

void loop()
{
  //Each loop, take a reading.
  //Start with temperature, as that data is needed for accurate compensation.
  //Reading the temperature updates the compensators of the other functions
  //in the background.

  Serial.print("Temperature: ");
  Serial.print(mySensor.readTempC(), 2);
  Serial.println(" degrees C");

  Serial.print("Temperature: ");
  Serial.print(mySensor.readTempF(), 2);
  Serial.println(" degrees F");

  Serial.print("Pressure: ");
  Serial.print(mySensor.readFloatPressure(), 2);
  Serial.println(" Pa");

  Serial.print("Altitude: ");
  Serial.print(mySensor.readFloatAltitudeMeters(), 2);
  Serial.println("m");

  Serial.print("Altitude: ");
  Serial.print(mySensor.readFloatAltitudeFeet(), 2);
  Serial.println("ft"); 

  Serial.print("%RH: ");
  Serial.print(mySensor.readFloatHumidity(), 2);
  Serial.println(" %");

  Serial.println();

  delay(10000);

}


user32849: The photo of the board shows that it is for BM E/P 280. It can take either the BME280 chip which does temperature, pressure and humidity, or the BMP280 chip which only does temperature and pressure.
The Register 0xD0 contains an ID which has a value of 0x60 for the BME280 and 0x58 for the BMP280.
Your output shows the ID as 0x58 which means you have a BMP280 temperature pressure chip.
I have been sold one of these, claiming to be a BME280 chip. I shall be asking for a refund.

14790: <p>My goal is to measure temperature, pressure and humidity using my Arduino Nano and the BME280 (GY-BME/P280).</p>

<p><a href="https://i.stack.imgur.com/iIuyk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iIuyk.jpg" alt="BME280 back"></a>
<a href="https://i.stack.imgur.com/4e6Bb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4e6Bb.jpg" alt="BME280 front"></a></p>

<p>To do this I use <a href="https://github.com/sparkfun/SparkFun_BME280_Arduino_Library" rel="nofollow noreferrer">this library</a> from SparkFun and that works almost. What I notice is probably invalid values for temperature and no humidity values at all.</p>

<p>The PINs:</p>

<ul>
<li>GND -> GND</li>
<li>VCC -> 3.3V</li>
<li>SDO -> D12</li>
<li>CSB -> D10</li>
<li>SDA -> D11</li>
<li>SCL -> D13</li>
</ul>

<p>I have noticed that I can unplug the VCC pin, it makes to difference to the measurements. I find that odd.
And I have noticed that the results are the same for 5V to VCC.</p>

<p>This is the result, I have tested this with I2C and SPI, it's the same:</p>

<pre><code>Program Started
Starting BME280.Program Started
Starting BME280... result of .begin(): 0x58
Displaying ID, reset and ctrl regs
ID(0xD0): 0x58
Reset register(0xE0): 0x0
ctrl_meas(0xF4): 0x27
ctrl_hum(0xF2): 0x0


Displaying all regs
0x80:9A 70 90 28 92 2D AF 00 76 6F 7D 67 32 00 93 8C 
0x90:C1 D6 D0 0B CF 18 AD FF F9 FF 8C 3C F8 C6 70 17 
0xA0:00 45 82 00 00 00 00 00 00 00 00 00 33 00 00 C0 
0xB0:00 54 00 00 00 00 60 02 00 01 FF 82 13 4E 08 00 
0xC0:00 87 27 FF 00 00 00 00 00 00 00 00 00 00 00 00 
0xD0:58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0xE0:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0xF0:00 00 00 0C 27 00 00 58 DD 00 82 72 00 00 00 00 


Displaying concatenated calibration words
dig_T1, uint16: 28534
dig_T2, int16: 26493
dig_T3, int16: 50
dig_P1, uint16: 35987
dig_P2, int16: -10559
dig_P3, int16: 3024
dig_P4, int16: 6351
dig_P5, int16: -83
dig_P6, int16: -7
dig_P7, int16: 15500
dig_P8, int16: -14600
dig_P9, int16: 6000
dig_H1, uint8: 69
dig_H2, int16: 0
dig_H3, uint8: 0
dig_H4, int16: 0
dig_H5, int16: 0
dig_H6, uint8: 0

Temperature: 24.59 degrees C
Temperature: 76.26 degrees F
Pressure: 101121.63 Pa
Altitude: 18.25m
Altitude: 59.87ft
%RH: 0.00 %
</code></pre>

<p>My script is almost exactly like the example from the library.</p>

<pre><code>/******************************************************************************
I2C_ReadAllData.ino
BME280 Arduino and Teensy example
Marshall Taylor @ SparkFun Electronics
May 20, 2015
https://github.com/sparkfun/SparkFun_BME280_Arduino_Library

This sketch configures the BME280 to read all measurements.  The sketch also
displays the BME280's physical memory and what the driver perceives the
calibration words to be.

Resources:
Uses Wire.h for I2C operation
Uses SPI.h for SPI operation

Development environment specifics:
Arduino IDE 1.6.4
Teensy loader 1.23

This code is released under the [MIT License](http://opensource.org/licenses/MIT).
Please review the LICENSE.md file included with this example. If you have any questions 
or concerns with licensing, please contact techsupport@sparkfun.com.
Distributed as-is; no warranty is given.
******************************************************************************/

#include &lt;stdint.h&gt;
#include "SparkFunBME280.h"
//Library allows either I2C or SPI, so include both.
#include "Wire.h"
#include "SPI.h"

//Global sensor object
BME280 mySensor;

void setup()
{
  //***Driver settings********************************//
  //commInterface can be I2C_MODE or SPI_MODE
  //specify chipSelectPin using arduino pin names
  //specify I2C address.  Can be 0x77(default) or 0x76

  //For I2C, enable the following and disable the SPI section
  //mySensor.settings.commInterface = I2C_MODE;
  //mySensor.settings.I2CAddress = 0x76;

  //For SPI enable the following and dissable the I2C section
  mySensor.settings.commInterface = SPI_MODE;
  mySensor.settings.chipSelectPin = 10;


  //***Operation settings*****************************//

  //renMode can be:
  //  0, Sleep mode
  //  1 or 2, Forced mode
  //  3, Normal mode
  mySensor.settings.runMode = 3; //Normal mode

  //tStandby can be:
  //  0, 0.5ms
  //  1, 62.5ms
  //  2, 125ms
  //  3, 250ms
  //  4, 500ms
  //  5, 1000ms
  //  6, 10ms
  //  7, 20ms
  mySensor.settings.tStandby = 0;

  //filter can be off or number of FIR coefficients to use:
  //  0, filter off
  //  1, coefficients = 2
  //  2, coefficients = 4
  //  3, coefficients = 8
  //  4, coefficients = 16
  mySensor.settings.filter = 0;

  //tempOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
  mySensor.settings.tempOverSample = 1;

  //pressOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
    mySensor.settings.pressOverSample = 1;

  //humidOverSample can be:
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 respectively
  mySensor.settings.humidOverSample = 1;

  Serial.begin(57600);
  Serial.print("Program Started\n");
  Serial.print("Starting BME280... result of .begin(): 0x");

  //Calling .begin() causes the settings to be loaded
  delay(10);  //Make sure sensor had enough time to turn on. BME280 requires 2ms to start up.
  Serial.println(mySensor.begin(), HEX);

  Serial.print("Displaying ID, reset and ctrl regs\n");

  Serial.print("ID(0xD0): 0x");
  Serial.println(mySensor.readRegister(BME280_CHIP_ID_REG), HEX);
  Serial.print("Reset register(0xE0): 0x");
  Serial.println(mySensor.readRegister(BME280_RST_REG), HEX);
  Serial.print("ctrl_meas(0xF4): 0x");
  Serial.println(mySensor.readRegister(BME280_CTRL_MEAS_REG), HEX);
  Serial.print("ctrl_hum(0xF2): 0x");
  Serial.println(mySensor.readRegister(BME280_CTRL_HUMIDITY_REG), HEX);

  Serial.print("\n\n");

  Serial.print("Displaying all regs\n");
  uint8_t memCounter = 0x80;
  uint8_t tempReadData;
  for(int rowi = 8; rowi &lt; 16; rowi++ )
  {
    Serial.print("0x");
    Serial.print(rowi, HEX);
    Serial.print("0:");
    for(int coli = 0; coli &lt; 16; coli++ )
    {
      tempReadData = mySensor.readRegister(memCounter);
      Serial.print((tempReadData &gt;&gt; 4) &amp; 0x0F, HEX);//Print first hex nibble
      Serial.print(tempReadData &amp; 0x0F, HEX);//Print second hex nibble
      Serial.print(" ");
      memCounter++;
    }
    Serial.print("\n");
  }


  Serial.print("\n\n");

  Serial.print("Displaying concatenated calibration words\n");
  Serial.print("dig_T1, uint16: ");
  Serial.println(mySensor.calibration.dig_T1);
  Serial.print("dig_T2, int16: ");
  Serial.println(mySensor.calibration.dig_T2);
  Serial.print("dig_T3, int16: ");
  Serial.println(mySensor.calibration.dig_T3);

  Serial.print("dig_P1, uint16: ");
  Serial.println(mySensor.calibration.dig_P1);
  Serial.print("dig_P2, int16: ");
  Serial.println(mySensor.calibration.dig_P2);
  Serial.print("dig_P3, int16: ");
  Serial.println(mySensor.calibration.dig_P3);
  Serial.print("dig_P4, int16: ");
  Serial.println(mySensor.calibration.dig_P4);
  Serial.print("dig_P5, int16: ");
  Serial.println(mySensor.calibration.dig_P5);
  Serial.print("dig_P6, int16: ");
  Serial.println(mySensor.calibration.dig_P6);
  Serial.print("dig_P7, int16: ");
  Serial.println(mySensor.calibration.dig_P7);
  Serial.print("dig_P8, int16: ");
  Serial.println(mySensor.calibration.dig_P8);
  Serial.print("dig_P9, int16: ");
  Serial.println(mySensor.calibration.dig_P9);

  Serial.print("dig_H1, uint8: ");
  Serial.println(mySensor.calibration.dig_H1);
  Serial.print("dig_H2, int16: ");
  Serial.println(mySensor.calibration.dig_H2);
  Serial.print("dig_H3, uint8: ");
  Serial.println(mySensor.calibration.dig_H3);
  Serial.print("dig_H4, int16: ");
  Serial.println(mySensor.calibration.dig_H4);
  Serial.print("dig_H5, int16: ");
  Serial.println(mySensor.calibration.dig_H5);
  Serial.print("dig_H6, uint8: ");
  Serial.println(mySensor.calibration.dig_H6);

  Serial.println();
}

void loop()
{
  //Each loop, take a reading.
  //Start with temperature, as that data is needed for accurate compensation.
  //Reading the temperature updates the compensators of the other functions
  //in the background.

  Serial.print("Temperature: ");
  Serial.print(mySensor.readTempC(), 2);
  Serial.println(" degrees C");

  Serial.print("Temperature: ");
  Serial.print(mySensor.readTempF(), 2);
  Serial.println(" degrees F");

  Serial.print("Pressure: ");
  Serial.print(mySensor.readFloatPressure(), 2);
  Serial.println(" Pa");

  Serial.print("Altitude: ");
  Serial.print(mySensor.readFloatAltitudeMeters(), 2);
  Serial.println("m");

  Serial.print("Altitude: ");
  Serial.print(mySensor.readFloatAltitudeFeet(), 2);
  Serial.println("ft"); 

  Serial.print("%RH: ");
  Serial.print(mySensor.readFloatHumidity(), 2);
  Serial.println(" %");

  Serial.println();

  delay(10000);

}
</code></pre>
 32849: <p>The photo of the board shows that it is for BM E/P 280. It can take either the BME280 chip which does temperature, pressure and humidity, or the BMP280 chip which only does temperature and pressure.</p>

<p>The Register 0xD0 contains an ID which has a value of 0x60 for the BME280 and 0x58 for the BMP280.</p>

<p>Your output shows the ID as 0x58 which means you have a BMP280 temperature pressure chip.</p>

<p>I have been sold one of these, claiming to be a BME280 chip. I shall be asking for a refund.</p>
