           
           if(push1_state!=prev_push1_state) {
             if(push1_state==HIGH) {
-              Serial.println("Push1 High");
               update(PUSH1, true);
             }
             else if(push1_state==LOW) {
-              Serial.println("Push1 Low");
               update(PUSH1, false);
             }
             client.print(aJson.print(frame));

    delay(300);
  }
  
  printWifiStatus();
  server.begin();
  Udp.begin(DEFAULT_UDP_PORT);
  
  //device profile
  if(announce) {
    aJson.addStringToObject(announce, "devicename", "TI_cc3200_1");
    aJson.addStringToObject(announce, "componentname", "cc3200button");
    aJson.addStringToObject(announce, "protocol", "tcp");
    aJson.addNumberToObject(announce, "port", 8000);
    aJson.addStringToObject(announce, "command","auth");
  }
  
  if(frame) {
    aJson.addStringToObject(frame, "devicename", "TI_cc3200_1");
    aJson.addStringToObject(frame, "componentname", "cc3200button");
    aJson.addStringToObject(frame, "command","buttonread");
    aJson.addBooleanToObject(frame, "button1", false);
    aJson.addBooleanToObject(frame, "button2", false);

  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
  
  Serial.print("MAC: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);
#endif
}

boolean endsWith(char* inString, char* compString) {
