   20170724 Calculate remaining time
   20180506 Preparatory work for M5Stack (display and keyboard)
   20180506 Hint: Use ESP8266 V2.4.0 since V2.4.1 has problems
-  20180510 First Version for M5Stack 
+  20180510 First Version for M5Stack
+  20180511 M5Stack: WiFi OFF by default, config menu, C button as value accelerator
   --------------------------------------------------*/
 #ifdef ESP32
 #include <M5Stack.h>
 #include <WiFi.h>
 #include <Free_Fonts.h>
+#define SWITCH_WIFI_ON false
 #else
 #include <ESP8266WiFi.h>
+#define SWITCH_WIFI_ON true
 #endif
 
 //--------------------------------------------------

void displaySetup()
{
  M5.begin();
  onDisplay();
}

void onDisplay()
{
  int actuLine = 0;
  M5.Lcd.fillScreen(TFT_BLACK);
  M5.Lcd.setFreeFont(FF9);
  outLCD(1, prgTitle + " " + prgVersion, TFT_BLUE);
  outLCD(2, "Delay to Start: " + String(delayToStart), TFT_WHITE);
  outLCD(3, "Number of Shots: " + String(numberOfShots), TFT_WHITE);
  outLCD(4, "Interval: " + String(delayBetweenShots), TFT_WHITE);
  if (startPin > -1)
    outLCD(5, "Wait for GPIO" + String(startPin), TFT_WHITE);
  outLCD(6, "START", TFT_YELLOW);
  outLCD(7, "STOP", TFT_YELLOW);
  outLCD(8, "ONE SHOT", TFT_YELLOW);
  outLCD(9, "RESET", TFT_YELLOW);
  outLCD(10, "Remaining delay: " + String(currentDelayToStart), TFT_GREEN);
  outLCD(11, "Remaining shots: " + String(currentNShots), TFT_GREEN);
}

void outLCD(int lineNumber, String outStr, int textColor)

            currentNShots--;
            NumberOfShotsSinceStart++;
          }
          onDisplay(MAINSCREEN);
        }
    }
  }
