  
   udp.beginMulti(ip,port);
 
-  // Send intital packet to announce that we're here.
-  //Serial.println((char*)pgm_read_word(&initialPacket)); 
-  //udp.beginPacket(udp.remoteIP(), udp.remotePort());
-  //udp.write((char*)pgm_read_word(&initialPacket));
-  //udp.endPacket();   
-
 }
 
 void loop() {

}

void callback() {
  
      if ( buttonState ) {
       Serial.println("Sending heartbeat (on)");               
       sentPacket = 1;
       
       char buffer[12];
       strcpy(packetBuffer,(char*)pgm_read_word(&loopPacket1) );
       strcat(packetBuffer, itoa( requestID, buffer, 10) );
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket2) );
       for (byte thisByte = 0; thisByte < 6; thisByte++) {
         sprintf(buffer, "%x", mac[thisByte] );
         strcat(packetBuffer, buffer); 
       }   
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket3) );
       for (byte thisByte = 0; thisByte < 6; thisByte++) {
         sprintf(buffer, "%x", mac[thisByte] );
         strcat(packetBuffer, buffer); 
       }   
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket4) );
       strcat(packetBuffer, "on");
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket5) );
       strcat(packetBuffer, itoa( millis(), buffer, 10) );
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket6) );

       Serial.println(packetBuffer); 
       udp.beginPacket(udp.remoteIP(), udp.remotePort());
       udp.write(packetBuffer);
       udp.endPacket();       
       requestID = requestID + 1;
      
    } else {
       Serial.println("Sending heartbeat (off)");               
       sentPacket = 1;     
 
       char buffer[12];
       strcpy(packetBuffer,(char*)pgm_read_word(&loopPacket1) );
       strcat(packetBuffer, itoa( requestID, buffer, 10) );
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket2) );
       for (byte thisByte = 0; thisByte < 6; thisByte++) {
         sprintf(buffer, "%x", mac[thisByte] );
         strcat(packetBuffer, buffer); 
       }   
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket3) );
       for (byte thisByte = 0; thisByte < 6; thisByte++) {
         sprintf(buffer, "%x", mac[thisByte] );
         strcat(packetBuffer, buffer); 
       }   
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket4) );
       strcat(packetBuffer, "off");
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket5) );
       strcat(packetBuffer, itoa( millis(), buffer, 10) );
       strcat(packetBuffer,(char*)pgm_read_word(&loopPacket6) );

       Serial.println(packetBuffer); 
       udp.beginPacket(udp.remoteIP(), udp.remotePort());
       udp.write(packetBuffer);
       udp.endPacket();      
       requestID = requestID + 1;
       
   }
}
  
  


    //Serial.print( "Button state = " );
    //Serial.println( buttonState );
    if ( buttonState && !sentPacket ) {
       Serial.println("Sending contact = on");  
       send_packet( "on" );       
       sentPacket = 1;
      
    } else if ( !buttonState && !sentPacket ) {
       Serial.println("Sending contact = off"); 
       send_packet( "off" );       
       sentPacket = 1;    
    }
  }
  
  if ( lastButtonState != reading ) {
