title: BME280 function without library, but getting negative numbers
body: <p>so i was working with the bme280 and tried to make a function that reads the temperature without using the library. but for some reason it is giving me - numbers. does someone know why that is the case?</p>
  <pre><code> long BME280_ReadTemperature()
  {
      long temperature = 0;
      Wire.beginTransmission(BME280_ADDR);
      Wire.write(BME280_TEMP_REG);
      Wire.endTransmission();
  
      //request 3 bits so that it can read 3 registers
      Wire.requestFrom(BME280_ADDR, 3);
  
      //These three are being read as shown in the powerpoint slides
      uint8_t reading1 = Wire.read();
      uint8_t reading2 = Wire.read();
      int reading3 = Wire.read();
  
      temperature |= (reading1 &lt;&lt; 8);
      temperature |= (reading2 &lt;&lt; 4);
      temperature |= reading3;
  
      return temperature;
  }
  </code></pre>