This is my first ESP32!
I have an ESP-WROOM-32 chip where I have placed a jumper between RX2 and TX2 in the hopes of seeing data being transmitted from TX2 to RX2.
In order to test it, I have the following code
Code: Select all
#define RXD2 16
#define TXD2 17
void setup() {
Serial.begin(115200);
Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2);
delay(1000);
Serial.println("Loopback program started");
}
void loop() {
if(Serial.available()){
Serial.write("-");
Serial2.write(Serial.read());
}
if(Serial2.available()){
Serial.write(".");
Serial.write(Serial2.read());
}
}
I am connected to the device via USB and have selected FireBeetle-ESP32 in the Arduino IDE since that's what I've seen recommended in various places.
What am I missing?
/Mads