 #include <util.h>
 
 #include <SPI.h>
+
+void send_packet( char * state );
+void callback( );
 
 int requestID = 1;
 unsigned long lastCallbackTime = 0;// the last time the data was written

 
  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() {

    //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 ) {
