#define ESPSerial Serial1
void setup() {
// wait for hardware serial to appear
while (!Serial);
// make this baud rate for the MCU
Serial.begin(115200);
// 9600 baud rate for the EPS
ESPSerial.begin(9600);
}
void loop() {
if (Serial.available()) {
char c = Serial.read();
ESPSerial.write(c);
}
if (ESPSSerial.available()) {
char c = ESPSerial.read();
Serial.write(c);
}
}