Skip to content

Class Instantiation

Arnd edited this page Dec 11, 2020 · 2 revisions

BME280();

The BME280 class instantiation has no parameters required for instantiation. The device itself isn't initialized until the begin() method is called.


Example:

BME280 Sensor();  // Instantiate class    
...    
while (!Sensor.begin()) {                                      // Loop until sensor found
  Serial.println("Error, unable to find or identify BME280."); // Show error message
  delay(5000);                                                 // Wait 5 seconds before retrying
} // of if-then we can't initialize or find the device
Clone this wiki locally