 		wifiFrame = wifiFrame + 1 % NUM_WIFI_FRAMES;
 	u8g2.drawXBM(SCREEN_WIDTH - 16, SCREEN_HEIGHT - 16, 16, 16, WIFI_FRAMES[wifiFrame]);
 	u8g2.sendBuffer();
+
+}
+
+void loop() {
+	wifiConnection.checkWiFi();
+
+	if (displayOn) {
+		display();
+	}
+
 
 	/*
 	  http.begin("http:///");

	wifiConnection.checkWiFi();
}

void button_pressed() {
	Serial.println("Button pressed!");
}

void loop() {
	wifiConnection.checkWiFi();

	String displayData;
	sensors_event_t event;
	dht.temperature().getEvent(&event);

		else
		{
			localIP = WiFi.localIP().toString();
		}
	}

