Problems of Decoding of Arduino

Our project is going to make remote control relay , and we use apps to send some signal ( “A” , “B”, etc) to the wifi module, and the “txd” of wifi module is connected to the "txd "of arduino bound mega 2560 through a operation amplifier. the arduino act as a decoder and receive the signal from the wifi module , by this i mean , when i enter an “A” the arduino should turn on relay 01.However, the output is not as intended.
our Arduino code :
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0,1);
LiquidCrystal lcd (12,11,5,4,3,2);
boolean thisPin;
char inByte;
void setup() {
Serial.begin(115200);
for (int thisPin = 40; thisPin < 44; thisPin++) {
pinMode(thisPin, OUTPUT);
}
lcd.begin(16,2);
lcd.print(“Relay is ready”);
}
void loop() {

if (Serial.available() > 0) {
int inByte = Serial.read();
delay(12);
lcd.setCursor(0,1);
switch (inByte) {
case ‘A’:
digitalWrite(40, HIGH);
lcd.print(“Relay01-ON”);
break;
case ‘a’:
digitalWrite(40, LOW);
lcd.print(“Relay01-OFF”);
break;
case ‘B’:
digitalWrite(41, HIGH);
lcd.print(“Relay02-ON”);
break;
case ‘b’:
digitalWrite(41, LOW);
lcd.print(“Relay02-OFF”);
break;
case ‘C’:
digitalWrite(42, HIGH);
lcd.print(“Relay03-ON”);
break;
case ‘c’:
digitalWrite(42, LOW);
lcd.print(“Relay03-OFF”);
break;
case ‘D’:
digitalWrite(43, HIGH);
lcd.print(“Relay04-ON”);
break;
case ‘d’:
digitalWrite(43, LOW);
lcd.print(“Relay04-OFF”);
break;
case ‘N’:
for(int thisPin = 40; thisPin < 44; thisPin++){
digitalWrite(thisPin, HIGH);
}
lcd.print(“AllRelay-ON”);
break;
case ‘F’:
for(int thisPin = 40; thisPin < 44; thisPin++){
digitalWrite(thisPin, LOW);
}
lcd.print(“AllRelay-OFF”);
break;
default:
return ;
}
}
}

No code tags, no link to the used hardware, no link to the included library. You have to provide the information!