Shield RFID and display 7 seg

Hi.

I´m using “#include <SevSeg.h>” library, and I show perfectly, when it is alone.

So, when I use a shield RFID (rfid-r522), by the code below, the display is blinking.

// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()){
return;}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial()){
return; }
MFRC522::StatusCode status;
status = (MFRC522::StatusCode) mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_B, trailerBlock, &key, &(mfrc522.uid));
status = (MFRC522::StatusCode) mfrc522.MIFARE_Read(blockAddr, buffer, &size);

I would like show display in same time that the RFID reader is available for read a new card.

thanks

I would like show display in same time that the RFID reader is available for read a new card.

Show what in the display?

Show ALL of your code, not just snippets that have nothing to do with the 7 segment display.

its all my code

#include <SevSeg.h> //Biblioteca do display
#include <SPI.h> //Biblioteca do SPI
#include <MFRC522.h> //Biblioteca do Leitor de RFID

//variáveis globais
unsigned char estado = 0; // Flag da maquina de estado
int botao = 2;

//display
SevSeg display7seg;
unsigned long timer;
char tempString[10]; //Used for sprintf no DISPLAY

//botao
int count;    // How long the button was held (secs)
byte previous = HIGH;
unsigned long firstTime;
int current;

//Leitor de RFID
#define RST_PIN         9           // Configurable, see typical pin layout above
#define SS_PIN          10          // Configurable, see typical pin layout above
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.
MFRC522::MIFARE_Key key;
byte chaveMestra[4]={0x4B,0x41,0x53,0x54}; //chave KAST

int numeroCartao = 1; //cartao a ser gravado

void setup() {
    Serial.begin(9600);
    
    //Display
    int displayType = COMMON_ANODE; 
    //Definicao dos pinos dos digitos
    int digit1 = 7; //Pino Digito1 do display 12
    int digit2 = A2; //Pino Digito2 do display 9
    int digit3 = A1; //Pino Digito3 do display 8
    int digit4 = A4; //Pino Digito4 do display 6
    //Pinos ligados aos segmentos A - H
    int segA = 8; //Pino segmento A  11
    int segB = A0; //Pino segmento B 7
    int segC = 3; //Pino segmento C 4
    int segD = 5; //Pino segmento D 2
    int segE = 6; //Pino segmento E 1
    int segF = A3; //Pino segmento F 10
    int segG = A5; //Pino segmento G 5
    int segDP= 4; //Pino segmento H 3
    //Define o numero de digitos do display
    int numberOfDigits = 4;
    //Inicializa o display
    display7seg.Begin(displayType, numberOfDigits, digit1, digit2, digit3, digit4, segA, segB, segC, segD, segE, segF, segG, segDP);
    //Nivel de brilho do display
    display7seg.SetBrightness(100);
    timer = millis();

    pinMode(botao, INPUT_PULLUP);

    SPI.begin();        // Init SPI bus
    mfrc522.PCD_Init(); // Init MFRC522 card
    // Prepare the key (used both as key A and as key B)
    // using FFFFFFFFFFFFh which is the default at chip delivery from the factory
    for (byte i = 0; i < 6; i++) {key.keyByte[i] = 0xFF;}
}

void loop() {
    byte blockAddr = 1;
    byte trailerBlock = 1;
    byte buffer[18];
    byte size = sizeof(buffer);
  
    current = digitalRead(botao); //botao
    
 
    switch (estado){
        case 0: 
            
            tempString[0]= 'A';
            tempString[1]= ' ';
            tempString[2]= ' ';
            tempString[3]= ' ';
            display7seg.DisplayString(tempString, 0);
            
            //INICIO BOTAO
            if (current == HIGH && previous == LOW && count >=0 && count < 3) {
                estado = 1;
                break;
            }
            if (current == HIGH) {
                count = 0;
            }
            previous = current;
            //TERMINO BOTAO
            
            // Look for new cards
            
            if ( ! mfrc522.PICC_IsNewCardPresent()){
                return;
            }
            // Select one of the cards
            if ( ! mfrc522.PICC_ReadCardSerial()){
                return;
            }
                      
            MFRC522::StatusCode status;
            status = (MFRC522::StatusCode) mfrc522.PCD_Authenticate(MFRC522::PICC_CMD_MF_AUTH_KEY_B, trailerBlock, &key, &(mfrc522.uid));
            status = (MFRC522::StatusCode) mfrc522.MIFARE_Read(blockAddr, buffer, &size);
            if (chaveMestra[0] == buffer[0] && chaveMestra[1] == buffer[1] && chaveMestra[2] == buffer[2] && chaveMestra[3] == buffer[3]){
                estado = 1;
            }
        break;
        case 1:  //configurar tempo
            tempString[0]= 'C';
            tempString[1]= ' ';
            tempString[2]= ' ';
            tempString[3]= ' ';
            display7seg.DisplayString(tempString, 0);
        break;
        default:
        break;
    }
}