using mpr121(capacitive touch sensor),sd card module and rfid (RC522) together

I am using arduino mega 2560 and for my project i need to use mpr121 (touch sensor) ,sd card module and rc522 simultaneously but my touch is not working when i combine it with sd card and rc522 in the arduino but it is working fine individually
i need to make sure that an audio is played whenever one of the electrode of mpr121 is touched but when i combine all 3
mpr121 touch is not getting enabled
Can anyone help me out with this?

This is the code that I am using for doing the project

code:
#include <require_cpp11.h>

#include <MFRC522Extended.h>

#include <deprecated.h>
#include <SD.h>
#include <TMRpcm.h>
#include <SPI.h>
#include <MFRC522.h>

#include <Wire.h>
#include "Adafruit_MPR121.h"

#ifndef _BV
#define _BV(bit) (1 << (bit))
#endif

// You can have up to 4 on one i2c bus but one is enough for testing!
Adafruit_MPR121 cap = Adafruit_MPR121();

// Keeps track of the last pins touched
// so we know when buttons are 'released'
uint16_t lasttouched = 0;
uint16_t currtouched = 0;

TMRpcm tmrpcm;

#define SDSlave 10 //CS pin fra SD card
#define RSTPIN 49 //reset pin from RFID
#define RFIDSLAVEPIN 53 // Slavepin from RFID

int pullldowndelay = 50;
// create an object for use in this sketch til lyden
MFRC522 mfrc522(RFIDSLAVEPIN, RSTPIN); // Create MFRC522 instance til RFID scanner

void setup() {
Serial.begin(9600);
pinMode(RFIDSLAVEPIN, OUTPUT);
pinMode(SDSlave, OUTPUT);

while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
SPI.begin(); // Init SPI bus

while (!Serial) { // needed to keep leonardo/micro from starting too fast!
delay(10);
}

Serial.println("Adafruit MPR121 Capacitive Touch sensor test");

// Default address is 0x5A, if tied to 3.3V its 0x5B
// If tied to SDA its 0x5C and if SCL then 0x5D
if (!cap.begin(0x5A)) {
Serial.println("MPR121 not found, check wiring?");
while (1);
}
Serial.println("MPR121 found!");

digitalWrite(RFIDSLAVEPIN, LOW);
digitalWrite(SDSlave, HIGH);

delay(pullldowndelay);

mfrc522.PCD_Init(); // Init MFRC522
mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD - MFRC522 Card Reader details
Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));

tmrpcm.speakerPin = 11;
digitalWrite(RFIDSLAVEPIN, HIGH);
digitalWrite(SDSlave, LOW);

delay(pullldowndelay);
if (!SD.begin(SDSlave)) { // see if the card is present and can be initialized:
return; // don't do anything more if not
}

tmrpcm.volume(1);

}

void loop() {

SDCARD();

}

void Sound() {
digitalWrite(RFIDSLAVEPIN, HIGH);
digitalWrite(SDSlave, LOW);
digitalWrite(mprSlave, HIGH);
delay(pullldowndelay);
Serial.print("Sound function called");
tmrpcm.play("6.wav");
delay(1000);
tmrpcm.play("4.wav");
delay(3000);
tmrpcm.play("5.wav");
delay(4000);
tmrpcm.play("3.wav");
delay(2000);

// delay after sound is played to let the song finish
delay(pullldowndelay);
digitalWrite(SDSlave, HIGH);
digitalWrite(RFIDSLAVEPIN, LOW);
digitalWrite(mprSlave, HIGH);
}

void SDCARD() {
// Look for new cards How to Make Arduino Security Access Lock | RFID MFRC522 - YouTube
digitalWrite(SDSlave, HIGH);
digitalWrite(RFIDSLAVEPIN, LOW);
digitalWrite(mprSlave, HIGH);
delay(pullldowndelay);
if (!mfrc522.PICC_IsNewCardPresent()) {
Serial.print("No new cards found");
Serial.println();
return;
}

// Select one of the cards
if (!mfrc522.PICC_ReadCardSerial()) {
Serial.print("Problems reading cards");
Serial.println();
return;
}

// Dump debug info about the card; PICC_HaltA() is automatically called
mfrc522.PICC_DumpToSerial(&(mfrc522.uid));

//Show UID on serial monitor
Serial.print("UID tag :");
String content = "";
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ");
_ Serial.print(mfrc522.uid.uidByte*, HEX);_
_ content.concat(String(mfrc522.uid.uidByte < 0x10 ? " 0" : " "));
content.concat(String(mfrc522.uid.uidByte, HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();*_

* if (content.substring(1) == "19 18 54 A2") //change here the UID of the card/cards that you want to give access*
* {*

* Serial.println("Authorized access");*
* Serial.println();*
* currtouched = cap.touched();*
* if ((currtouched & BV(4))){*
* delay(3000);
Sound();
}
}
}
rfidsdmpr.ino (4.77 KB)*_

@bharathrushab

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.