  
       nDevices++;
     }
-    else if (error==4)
-    {
+    else if (error == 4) {
       Serial.print("Unknow error at address 0x");
       if (address<16)
         Serial.print("0");

}

void getTempMLX() {
  {
  Serial.print("MLX Ambient = "); 
  Serial.print(mlx.readAmbientTempC()); 
  Serial.print("*C\tMLX Object = "); 

#include <SFE_MicroOLED.h>  // Include the SFE_MicroOLED library
#include <DHT.h>
#include <Adafruit_MLX90614.h>
#include "Switch.h"

#define PIN_RESET 255  // MicroOLED
#define DC_JUMPER 0  // I2C Addres: 0 - 0x3C, 1 - 0x3D - OLED Display

#define DHTPIN D4
#define DHTTYPE DHT22

const byte buttonPin = D3; // Button Shield
const int ledPin = BUILTIN_LED; // Wemos D1 Built-in LED

int i =0;

/////////////////////////////////////////////////////////////
// Hardware Initialization
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
DHT dht(DHTPIN, DHTTYPE);
MicroOLED oled(PIN_RESET, DC_JUMPER);
Switch button = Switch(buttonPin);
/////////////////////////////////////////////////////////////

void setup() {
  Serial.begin(9600);
  Wire.begin();
  mlx.begin();
  dht.begin();
  // oled.begin();     // Initialize the OLED
  
  // oled.clear(PAGE); // Clear the display's internal memory
  // oled.clear(ALL);  // Clear the library's display buffer
  // oled.display();   // Display what's in the buffer (splashscreen)
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
}

void loop() {
  button.poll();
  // textExamples();  // Finally the text example
  // printInitialScreen();  
  // scanI2CDevices();

  if(button.switched()) {
    Serial.print("SWITHCED");
    digitalWrite(ledPin, HIGH);
  }
  if (button.pushed()) {
    Serial.print("pushed ");
    Serial.print(++i);
    Serial.print(" ");
  }

  if (button.longPress()) {
    Serial.print("longPress ");
    digitalWrite(ledPin, HIGH);
    getTemp();
    getTempMLX();
   // printInitialScreen();
  }

  if (button.doubleClick()) {
    Serial.print("doubleClick ");
    // getTemp();
  }

  if (button.released()) {
    Serial.print("released\n");
    digitalWrite(ledPin, LOW);
  }
}

void getTemp() {
