i want to control relay with IR remote + bluetooth + push button

i found this code on internet. i want to control 8 relay with IR remote + bluetooth + push button.
am triying to modify it am not able to do it so anyone pls help me to make the code.
and i want to add eeprom to this code

#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1); // RX, TX
#include <EEPROM.h>
#include <IRremote.h>
int myReceiver = A0;
IRrecv myReceiver(RECV_PIN);
char bt_data; // variable to receive data from the serial port

int relay1 = 5;
int relay2 = 4;
int relay3 = 3;
int relay4 = 2;
int relay5 = 6;
int relay6 = 7;
int relay7 = 8;
int relay8 = 9;

int L1, L2, L3, L4, L5, L6, L7, L8, stop=0;

int touch1 = A0;
int touch2 = A1;
int touch3 = A2;
int touch4 = A3;
int touch5 = A4;
int touch6 = A5;
int touch7 = 10;
int touch8 = 11;

void setup() {
L1 = EEPROM.read(1);
L2 = EEPROM.read(2);
L3 = EEPROM.read(3);
L4 = EEPROM.read(4);
L5 = EEPROM.read(5);
L6 = EEPROM.read(6);
L7 = EEPROM.read(7);
L8 = EEPROM.read(8);

pinMode(touch1, INPUT);
pinMode(touch2, INPUT);
pinMode(touch3, INPUT);
pinMode(touch4, INPUT);
pinMode(touch5, INPUT);
pinMode(touch6, INPUT);
pinMode(touch7, INPUT);
pinMode(touch8, INPUT);

pinMode(relay1, OUTPUT); digitalWrite(relay1, L1);
pinMode(relay2, OUTPUT); digitalWrite(relay2, L2);
pinMode(relay3, OUTPUT); digitalWrite(relay3, L3);
pinMode(relay4, OUTPUT); digitalWrite(relay4, L4);
pinMode(relay5, OUTPUT); digitalWrite(relay5, L5);
pinMode(relay6, OUTPUT); digitalWrite(relay6, L6);
pinMode(relay7, OUTPUT); digitalWrite(relay7, L7);
pinMode(relay8, OUTPUT); digitalWrite(relay8, L8);

mySerial.begin(9600); // start serial communication at 9600bps
delay(500);
}

//setup ir receiver
myReceiver.enableIRIn(); // Start the receiver
Serial.println(F(“Ready to receive IR signals”));

void loop() {

if(mySerial.available()>0){bt_data = mySerial.read();}

if(bt_data == ‘a’){L1=1;EEPROM.write(1, L1);}
if(bt_data == ‘A’){L1=0;EEPROM.write(1, L1);}

if(bt_data == ‘b’){L2=1;EEPROM.write(2, L2);}
if(bt_data == ‘B’){L2=0;EEPROM.write(2, L2);}

if(bt_data == ‘c’){L3=1;EEPROM.write(3, L3);}
if(bt_data == ‘C’){L3=0;EEPROM.write(3, L3);}

if(bt_data == ‘d’){L4=1;EEPROM.write(4, L4);}
if(bt_data == ‘D’){L4=0;EEPROM.write(4, L4);}

if(bt_data == ‘e’){L5=1;EEPROM.write(5, L5);}
if(bt_data == ‘E’){L5=0;EEPROM.write(5, L5);}

if(bt_data == ‘f’){L6=1;EEPROM.write(6, L6);}
if(bt_data == ‘F’){L6=0;EEPROM.write(6, L6);}

if(bt_data == ‘g’){L7=1;EEPROM.write(7, L7);}
if(bt_data == ‘G’){L7=0;EEPROM.write(7, L7);}

if(bt_data == ‘h’){L8=1;EEPROM.write(8, L8);}
if(bt_data == ‘H’){L8=0;EEPROM.write(8, L8);}

bt_data=‘0’;

if (digitalRead (touch1) == 1 && stop==0){stop=1;
L1 = L1+1;
if(L1>1){L1=0;}
EEPROM.write(1, L1);
delay(100);
}

if (digitalRead (touch2) == 1 && stop==0){stop=1;
L2 = L2+1;
if(L2>1){L2=0;}
EEPROM.write(2, L2);
delay(100);
}

if (digitalRead (touch3) == 1 && stop==0){stop=1;
L3 = L3+1;
if(L3>1){L3=0;}
EEPROM.write(3, L3);
delay(100);
}

if (digitalRead (touch4) == 1 && stop==0){stop=1;
L4 = L4+1;
if(L4>1){L4=0;}
EEPROM.write(4, L4);
delay(100);
}

if (digitalRead (touch5) == 1 && stop==0){stop=1;
L5 = L5+1;
if(L5>1){L5=0;}
EEPROM.write(5, L5);
delay(100);
}

if (digitalRead (touch6) == 1 && stop==0){stop=1;
L6 = L6+1;
if(L6>1){L6=0;}
EEPROM.write(6, L6);
delay(100);
}

if (digitalRead (touch7) == 1 && stop==0){stop=1;
L7 = L7+1;
if(L7>1){L7=0;}
EEPROM.write(7, L7);
delay(100);
}

if (digitalRead (touch8) == 1 && stop==0){stop=1;
L8 = L8+1;
if(L8>1){L8=0;}
EEPROM.write(8, L8);
delay(100);
}

if (digitalRead (touch1) == 0 && digitalRead (touch2) == 0 && digitalRead (touch3) == 0 && digitalRead (touch4) == 0 && digitalRead (touch5) == 0 && digitalRead (touch6) == 0 && digitalRead (touch7) == 0 && digitalRead (touch8) == 0){stop=0;}

digitalWrite(relay1, L1);
digitalWrite(relay2, L2);
digitalWrite(relay3, L3);
digitalWrite(relay4, L4);
digitalWrite(relay5, L5);
digitalWrite(relay6, L6);
digitalWrite(relay7, L7);
digitalWrite(relay8, L8);
delay(100);
}

if(myReceiver.getResults()) {
myDecoder.decode();
Serial.println(myDecoder.value);

switch(myDecoder.value){
case 16580863:
digitalWrite(relay1,!digitalRead(relay1));
break;

case 16613503:
digitalWrite(relay2,!digitalRead(relay2));
break;

case 16597183:
digitalWrite(relay3,!digitalRead(relay3));
break;

case 16589023:
digitalWrite(relay4,!digitalRead(relay4));
break;
}
myReceiver.enableIRIn();
}

Why are you using software serial on the hardware serial pins?

You’ve also got two uses for A0.

Please remember to use code tags when posting code.

i dont know detail about to code i found this on internet and tried to modify

So, which bits did you find and which bits did you modify?

…and now you’ve repeated the same question on another topic.

This isn’t to going to end well.

Out.

@yuvatcp2012

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.

@yuvatcp2012

I gave you those links please USE THEM !
That is NOT how you post code.

Post it like that again and I will delete it.

Again, why would you use software serial on hardware serial pins?

It’s also quite possible you have worn-out your EEPROM.

am totally new to coding so pls fix it how to do

yuvatcp2012:
am totally new to coding so pls fix it how to do

read post #5 please

am sorry am new to arduino cc form thats why i have posted again pls help me with the code

Here’s a starter (uncompiled, untested. Obviously)

#include <EEPROM.h>

const int N_ELEMENTS = 4;
const int EEPROM_BASE_ADDRESS = 1;

const int relay[N_ELEMENTS] {2, 3, 4, 5};
int L [N_ELEMENTS], 
      stop;

const byte touch [N_ELEMENTS] {6, 7, 8, 9};
char bt_data; // variable to receive data from the serial port

void setup() 
{
  for (int i = 0; i < N_ELEMENTS; i++) {
    L [i] = EEPROM.read (i + EEPROM_BASE_ADDRESS);
    pinMode(touch [i], INPUT);
    pinMode(relay [i], OUTPUT); 
	digitalWrite(relay [i], L [i]);
  } 
  Serial.begin(9600);
  delay(500);
}

with this i want to add ir remote

pls replay anyone to the post

with this i want to add ir remote

So, do it. Only you have any clue what you want the IR remote to do.

@yuvatcp2012

Right now you have two choices !
Follow the links below and the forum rules or kiss your account goodbye !

Other post DELETED !

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.

What I want to do. When am not able to understand in that time I was doing some mistake so you will treat beginners like this only. when a person is not understand the coding thats why asking for guidance but you are not giving the solution to my post which I have posted

Anyone is there pls reply

if ENGLISH is not your first language.

if you would like your post moved please use the "report to moderator" option

ballscrewbob:
if ENGLISH is not your first language.

if you would like your post moved please use the "report to moderator" option

English is comfortable for me