So I'm trying this simple project to have serial communication between Arduino Uno and ESP32. There are no errors when uploading the code but there is no output in the serial monitor of ESP32. For reference, I have attached the schematic diagram that I have used in connecting the Uno and ESP32, as well as the code for Uno and the code for ESP32.
Code for Uno:
Code for ESP32:
#define RXD2 16
#define TXD2 17
// put your setup code here, to run once:
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
Can you please note on your circuit, the pin numbers/labels on each controller please?
What are tx2 and rx2 pin labels on the UNO?
HardwareSerial SerialTFMini( 1 );
HardwareSerial SerialBrain( 2 );
////// serial(1) = pin27=RX green, pin26=TX white
////// serial(2) = pin16=RXgreen , pin17=TX white
Serial.begin( SerialDataBits );
SerialBrain.begin( SerialDataBits );
SerialTFMini.begin( SerialDataBits, SERIAL_8N1, 27, 26 );
// Initialize the TFMini LIDAR
There you can see 3 serial ports being setup and initialized on an ESP32.
December 6, 2021, 10:52am
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.