A modified library for BME280 sensor.

Dependents:   Auto_pilot_prototype_3_2

Revision:
6:7c4db7db09eb
Parent:
5:c1f1647004c4
--- a/BME280.cpp	Sat Mar 11 04:21:14 2017 +0000
+++ b/BME280.cpp	Sat May 23 13:16:02 2020 +0000
@@ -55,9 +55,12 @@
     if (NULL != i2c_p)
         delete  i2c_p;
 }
-    
+
 void BME280::initialize()
 {
+    //I2C initialization
+    i2c.frequency(400000); //400 kHz
+    
     char cmd[18];
  
     cmd[0] = 0xf2; // ctrl_hum
@@ -114,7 +117,7 @@
  
     DEBUG_PRINT("dig_H = 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", dig_H1, dig_H2, dig_H3, dig_H4, dig_H5, dig_H6);
 }
- 
+
 float BME280::getTemperature()
 {
     uint32_t temp_raw;