           #endif         
           if(strcmp(accessResponse.AccessAllowed,"true")==0)
           {
+               storedSerial = serial;
+               
+               #ifdef DEBUG
+                 Serial.println("Stored" + storedSerial);
+               #endif
+               
                #ifdef USELED
-                 digitalWrite(GREEN_LED, HIGH);
+                 TurnOnLED(GREEN_LED);
                #endif
                #ifdef USETONE
                   tone(TONEPIN,300,1000);

               #endif
           }
           delay(2000);
        }
      }
      #ifdef USELED
          digitalWrite(RED_LED, LOW);
          digitalWrite(GREEN_LED, LOW);
          digitalWrite(YELLOW_LED, HIGH);
      #endif
      #ifdef USELCD         
           ClearScreen();
           lcdSerial.write("Please scan card");
      #endif
}

void ClearScreen()

              
               if(accessResponse.TimeLimit != 0)
               {
                 
                 #ifdef DEBUG
                   Serial.println(accessResponse.TimeLimit);
                 #endif
                 //Need to add a countdown timer here so that time counts down the time remaining and outputs to the LCD
                 //delay(accessResponse.TimeLimit * 60000);
                 CountDownTimer(); // run the timer
                 SetTimer(0,0,accessResponse.TimeLimit * 60); // 10 seconds
                 StartTimer();
               }
               
           }
           else{
               #ifdef USELED
                  TurnOnLED(RED_LED);
               #endif
               #ifdef USETONE
                  tone(TONEPIN,100,1000);
