Page 1 of 1

Serial Communication between two ESP32

Posted: Mon Jun 17, 2019 6:25 am
by rjrajbir
Hi,I have found examples of basic arduino to arduino serial communication but have been unable to get those working on ESP32 boards. I am trying to make the same thing work between two ESP32's The two are connected:

esp1 esp2
gnd to gnd
tx2 to rx2
rx2 to tx2
Simple sketches:

//transmit sketch
void setup() {
Serial.begin(9600);
}

void loop() {
Serial.println("test...");
delay(1000);
}

//receive sketch
void setup() {
Serial.begin(9600);
}

void loop() {
String received = "";
while (Serial.available())
{
received = Serial.read();
Serial.println(received);
}
}
What else is required to make this work?

Re: Serial Communication between two ESP32

Posted: Mon Jun 17, 2019 7:57 am
by ESP_Sprite
Moved to Arduino subforums.