Serial communication between two ESP32 dev boards
Posted: Sun Mar 11, 2018 1:02 am
I have found examples of basic arduino to arduino serial communication but have been unable to get those working between ESP32 boards. The two are connected:
Simple sketches:
What else is required to make this work? I have also tried sharing vcc/vin between them.
Thanks
Code: Select all
esp1 esp2
gnd to gnd
tx2 to rx2
rx2 to tx2
Code: Select all
//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);
}
}
Thanks