NFC card programming problem

I am doing a project for NFC EV charger billing system. I want to write a program that when ISO 14443A card placed near the PN532 NFC shield. Two 7-segments display will act a countdown timer to count from 20 to 00. When the time reaches to 00 and I placed the ISO 14443A card near the NFC shield again. Two 7-segment displays did not count down. What can I do for this program to make the countdown goes again when ISO 14443A placed near the NFC shield?

sketch_feb16b.ino (16.6 KB)

What can I do for this program to make the countdown goes again when ISO 14443A placed near the NFC shield?

You have not defined what did happen when you placed the card again. Without knowing what actually happened, its impossible to tell you how to fix the code.

#define IRQ (2)
#define RESET (3) // Not connected by default on the NFC Shield
Adafruit_NFCShield_I2C nfc(IRQ, RESET);

int pin1 = 2;

It looks like you have the NFC shield and the 7 segment display connected to the same pin. Not a good idea, usually.

When the program loop again in

void loop(void){...

success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);

The value of success becomes 0 keep looping "Done!"

Just know I am the beginner of arduino!!

Just know I am the beginner of arduino!!

So, have you quit using the same pin for two purposes? Did that solve the problem?