Serial Communication between two ESP32

rjrajbir
Posts: 5
Joined: Mon Jun 10, 2019 5:51 am

Serial Communication between two ESP32

Postby rjrajbir » Mon Jun 17, 2019 6:25 am

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?

ESP_Sprite
Posts: 9729
Joined: Thu Nov 26, 2015 4:08 am

Re: Serial Communication between two ESP32

Postby ESP_Sprite » Mon Jun 17, 2019 7:57 am

Moved to Arduino subforums.

Who is online

Users browsing this forum: Bing [Bot] and 117 guests