I am trying to comunicate between Arduino And esp32.
this is my aurdino code:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hello Boss");
delay(1500);
}
This is my esp32 code
#define RXp2 16
#define TXp2 17
void setup() {
Serial.begin(115200);
Serial2.begin(9600, SERIAL_8N1, RXp2, TXp2);
}
void loop() {
Serial.println("Message Received: ");
Serial.println(Serial2.readString());
}
my esp32 code gets compiled and even gets uploaded,but my aurdino code gets compiled but while uploading it shows error:
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno"
Sketch uses 1632 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 198 bytes (9%) of dynamic memory, leaving 1850 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Just for confirming i am using correct ports for both codes....