 IPAddress influxdbudp = MQTT_SERVER;
 IPAddress mqtt_server = MQTT_SERVER;
 IPAddress time_server = MQTT_SERVER;
+
 //
-//RtcDS3231 Rtc;
-
 #define INFO_PRINT 0
 #define DEBUG_PRINT 1
 
+// rtc
+#define SquareWavePin 1
+volatile unsigned long SquareWaveCount;
+unsigned long old_SquareWaveCount;
+
+RtcDS1307 Rtc;
+
+//---------
 char* topic = "esp8266/arduino/s03";
 char* hellotopic = "HELLO";
 


void printDigits(int digits) {
  // utility for digital clock display: prints preceding colon and leading 0
  lcd.print(": ");
  if (digits < 10) {
    lcd.print('0');
  }

  clientName += " - ";
  clientName += String(micros() & 0xff, 16);

  WiFiClient::setLocalPortStart(analogRead(A0));
  wifi_connect();

