 bool triggeredJoystick = false;
 
 bool WiFiConnected = false;
+bool NTPupdated = false;
+bool MessageSentBooted = false;
 
 // Initialize the OLED display using Wire library
 SSD1306  display(0x3c, D1, D2);

#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
/* #include <WiFiClientSecure.h> */
/* #include <UniversalTelegramBot.h> */

#define MAX_BUFFER_SIZE 2500

#ifndef _BOT_ID
#include "telegram.h"
#endif

/* WiFiClientSecure client; */
/* UniversalTelegramBot bot(_BOT_ID, client); */

int Bot_mtbs = 1000; //mean time between scan messages
long Bot_lasttime;   //last time messages' scan has been done

void msOverlay(OLEDDisplay *display, OLEDDisplayUiState* state) {
    display->setTextAlignment(TEXT_ALIGN_LEFT);
    display->setFont(ArialMT_Plain_10);
    display->drawString(0, 0, timeClient.getFormattedTime());
    display->drawString(display->getStringWidth(timeClient.getFormattedTime())+1, 0, WiFi.SSID());
}

void drawFrame1(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
    display->setFont(ArialMT_Plain_16);
    display->setTextAlignment(TEXT_ALIGN_LEFT);
    if(!WiFiConnected)
        display->drawString(0, 20, "Connecting...");
    else
        display->drawStringMaxWidth(0, 20, 128, String("Herzlich Willkommen!"));
}

void drawFrame2(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y) {
