     { 
       WiFiClient client = server.available();
       if(client) {
-        Serial.println("new client");
         while(client.connected()) {
           digitalWrite(RED_LED, HIGH);
           

          if(push2_state!=prev_push2_state) 
          {
            if(push2_state==HIGH) {
              Serial.println("Push2 High");
              update(PUSH2, true);
            }
            else if(push2_state==LOW) {
              Serial.println("Push2 Low");
              update(PUSH2, false);
            }
            client.print(aJson.print(frame));
            delay(50);
          }
         
          
          
          prev_push1_state = push1_state;
          prev_push2_state = push2_state;
        }
        Serial.println("connection closed");
        digitalWrite(RED_LED, LOW);
        client.stop();
        



void printWifiStatus() {
#ifdef USE_UART
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());
