How i can use lcd shield and nfc shield working on I2C on paralel

I am on an Arduino Mega 2560, I have two shields to use an LCD 16*2 olimex #include and pn532 rfid/nfc v.2, the nfc is connected to the SDA / SCL (20,21), and the other SDA1 / SCL1. I initialize and run the screen after that the NFC starts reading, but to return to answer the screen NOTHING.

I tried to solve the problem using the function wire and after that thinked about use EnableInetrrupt but NOTHING too,

https://stackoverflow.com/questions/55628842/how-i-can-use-lcd-shield-and-nfc-shield-working-on-i2c-on-paralel

#include <EEPROM.h>
#include <LCD16x2.h>
#include <Wire.h>
#define EI_ARDUINO_INTERRUPTED_PIN // to enable pin states functionality
#include <EnableInterrupt.h>

#include <PN532_I2C.h>
#include <PN532.h>
#include <NfcAdapter.h>
#include <nfcTag.h>
PN532_I2C pn532i2c(Wire);
PN532 nfc(pn532i2c);

#define allow 49
#define deny 50
#define SDA 20
#define SCL 22

const byte nbrC = 12;

int address_lcd = 48;
int address_nfc = 36;

struct MyObject {
char id[nbrC-2];
};

LCD16x2 lcd;

void turnLight(int led){
digitalWrite(led, HIGH);
delay(3000);
digitalWrite(led, LOW);
}

void displayT(char c){
Wire.endTransmission();
Wire.flush();
Wire.beginTransmission(address_lcd);
lcd.lcdGoToXY( 1,1);
switch (c) {
case ‘A’:
lcd.lcdWrite(“ACCESS ALLOWED”);
Serial.print("ACCESS ALLOWED - ");
Serial.print("STATE: OPEN - ");
turnLight(allow);
Serial.println(“STATE: CLOSE”);
lcd.lcdClear();
break;
case ‘D’:
Serial.print(“ACCESS DENY “);
lcd.lcdWrite(“ACCESS DENY”);
turnLight(deny);
Serial.println(”- - - - - - - - -”);
lcd.lcdClear();
break;
case ‘T’:
lcd.lcdWrite( “ACCESS TRIED”);
delay(3000);
lcd.lcdClear();
break;
}
Wire.endTransmission();
Wire.beginTransmission(address_nfc);

}

//*******************Tag READ fonction
String fct_lecture(){
String Received;
boolean success;
uint8_t IdReceived = { 0, 0, 0, 0, 0, 0, 0 };
uint8_t Id_Length;
//Wire.beginTransmission(address_nfc);
if (success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &IdReceived[0],&Id_Length)){

for (uint8_t i=0; i < Id_Length; i++)
Received += String(IdReceived*, HEX);*

  • Serial.print("\nTAG Id: ");Serial.println(Received);*
  • displayT(‘T’);*
  • if(eeprom_getAll(0, 100, Received)){*
  • displayT(‘A’);*
  • }else{*
  • displayT(‘D’);*
  • }*
  • return(Received);*
  • }*
  • else*
  • return(“NULL”);*
    }
    void setup(void) {
  • Wire.begin();*
  • lcd.lcdClear();*
  • lcd.lcdSetBlacklight(150);*
  • lcd.lcdGoToXY( 2,1);lcd.lcdWrite(“NFC LOCK ON”);delay(5000);lcd.lcdClear();*
  • Serial.begin(115200);*
  • //while(!Serial);*
  • Serial.println(“Hello!”);*
  • Wire.begin(address_nfc);*
  • nfc.begin();*
  • uint32_t versiondata = nfc.getFirmwareVersion();*
  • nfc.setPassiveActivationRetries(0xFF);*
  • nfc.SAMConfig();*
  • pinMode(allow, OUTPUT);*
  • pinMode(deny, OUTPUT);*
  • Serial.println(“NFC LOCK”);*
    }
    void loop(void) {
  • String Received;*
  • Received=fct_lecture();*
  • if(Received != 0){*
  • Serial.println("\nKey not found");*
  • //Wire.beginTransmission(address_lcd);*
  • lcd.lcdGoToXY( 1,1);*
  • lcd.lcdWrite( “KEY NOT FOUND”);*
  • delay(1000);*
  • lcd.lcdClear();*
  • //Wire.endTransmission(address_lcd);*
  • }*
    }

I'm sure that your code looks nothing like that.
I'm sure that you need to read the stickies at the top of the forum, and POST YOUR CODE CORRECTLY.