little bit code need help

Dear friends,
working on RFID module MFRC522, and written an application as follow

if(mfrc522.uid.uidByte[0] == 114){ //"114" is the first part of the 5 sets of digits from the card
Serial.println("hey Lalit!");
digitalWrite(ledPin1, HIGH); //turns on green "access granted" LED
digitalWrite(ledPin1, LOW);

In the above code, when my RFID Card having a value 114 gets read by the Reader then "hey Lalit" message get printed on Serial monitor screen and ledPin1 (which is pin number 3 on arduino board with Red LED) gets HIGH for 1 second, code is OK and working fine.
OK ..... now I want a Green LED on pin number 4, lets denote it as ledPin2 and code should work as follow

  1. Reader reads card first time, Red LED becomes high for 1 second.
  2. Reader reads same card second time, now Green Led should high for 1 second.
  3. Reader reads same card third time, now again Red LED should high for 1 second.
    .and same cycle should continue till Reader read the same card.
    thanks, any help will be highly appreciated. :slight_smile:

What’s wrong with the answers you are getting here?

What's wrong with the answers you are getting here?
how to solve this RFID event based program - Programming Questions - Arduino Forum

I have only one card, which used to switch to different actions alternate.