 int codeLen; // The length of the code
 int toggle = 0; // The RC5/6 toggle state
 unsigned long sentLockMillis = 0;
-
-int lastButtonState;
+unsigned long tempLockMillis = 0;
 
 // Stores the code for later playback
 // Most of this code is just logging

char numAsCharBuff[2];
char ledChange;

//---------------------------------------------------------------------------

void setup()
{
    irrecv.enableIRIn(); // Start the receiver
    pinMode(BUTTON_PIN, INPUT);
    Serial.begin(9600);
    
    // Initialize WiServer and have it use the sendMyPage function to serve pages
    pinMode(ledPin1, OUTPUT);
    pinMode(RECV_PIN, INPUT);
    pinMode(BUTTON_PIN, INPUT);
    pinMode(ANALOG_LIGHT_PIN, INPUT);
  
    //WiFi.init();
    WiServer.init(sendPage);

  else {
    //sendCode();
  }
   
  WiServer.server_task();
}
