   lcd.createChar(5,sol); 
   lcd.createChar(6,la); 
   lcd.createChar(7,si);
+  lcd.createChar(8,deg); 
   
   lcd.begin(16, 2);                   
   lcd.setCursor(0,0); 

  for( loadTime = 7 ; loadTime < 10; ++loadTime)
    loadScreen(loadTime); 

  if(bufferr[0]!=ESP8266_SSID[0] || bufferr[1]!=ESP8266_SSID[1] || bufferr[2]!=ESP8266_SSID[2]){          // test if the ESP is already connected to previous WiFi 
  wifiSEND.sendCommand(F("AT+RST"), bufferr, sizeof(bufferr));                 // reset WiFi module 
  delay(2000); 
  wifiSEND.setupAsWifiStation(ESP8266_SSID, ESP8266_PASS, &Serial);            // connect to the WiFi with the set ssid and password 

      setColor(0,0,0); 
    }
    delay(900); 
  }  
}


void loop()                                                                // start a new cycle
{  
  if(DEBUG) Serial.println("Starting new cycle");                           


  
  if(DEBUG) Serial.print("Gas value is ");                                 // read gas and alarm if gas levels are too high ( over 45% = gas leaks, over 50% = hazardous environment ) 
  if(DEBUG) Serial.println(analogRead(GASpin)); 
  if(analogRead(GASpin)>450){
      if(analogRead(GASpin)>500){
        lcd.setCursor(0,0); 
        lcd.print(" WARNING! GAS"); 
        lcd.setCursor(0,1); 
        lcd.print("  LEVELS EXCEEDED!"); 
        tone(BUZZpin, 2000, 500); 
      }
      else{
        lcd.setCursor(0,0); 
        lcd.print(" WARNING! Gas"); 
        lcd.setCursor(0,1); 
        lcd.print("  leaks detected!"); 
      }

      char buffer[250];                                                                                  // send WiFi data in case of gas leaks (>25% gas levels)

      memcpy(buffer, 0, sizeof(buffer));     
      strncpy_P(buffer, PSTR("/get/getgas.php?p=abc"), sizeof(buffer)-1);
     
      strncpy_P(buffer+strlen(buffer), PSTR("&lastg="), sizeof(buffer)-strlen(buffer)-1);
      ltoa(analogRead(GASpin), buffer+strlen(buffer), 10); 
        
      if(DEBUG) Serial.print("Requesting GAS");
      if(DEBUG) Serial.print(buffer);
      if(DEBUG) Serial.print(": ");
      
      unsigned int httpResponseCode = 
        wifiSEND.GET
        (
          F("86.123.250.85"),     
          80,                     
          buffer,                 
          sizeof(buffer),         
          F("seba.tm-edu.ro"), 
          2                       
                                   
                                  
        );
  
    if(httpResponseCode == 200 || httpResponseCode == ESP8266_OK){
      if(DEBUG) Serial.println("OK");
      if(DEBUG) Serial.println(buffer);
    }
    else
      if(httpResponseCode < 100) 
        wifiSEND.debugPrintError((byte)httpResponseCode, &Serial);
      else{
        if(DEBUG) Serial.print("HTTP Status ");
        if(DEBUG) Serial.println(httpResponseCode);
      }     
   
     delay(1000); 
  }
  else
    noTone(BUZZpin); 


  ifPressButton();


  if(digitalRead(PIRsensorPin)){                                                                 // event motion sense 
    if(DEBUG) Serial.println("Somebody is in this area!"); 
    LASTmotion=millis()/1000; 
