Tx Rx not working at all

Hello,
I’m trying to get 2 XIAO boards communicate each other.
One of them is ESP32C3 and the other is nRF52840.
I uploaded the most basic sketches that I can just to see if there is any communication.

the sender board sketch:

void setup() {
  Serial.begin(9600);
  
}

void loop() {
  Serial.print("Hello");
  Serial.print("my");
  Serial.print("name");
  Serial.print("is");
  Serial.print("Dan");
}

and the receiver board sketch:

void setup() {
  Serial.begin(9600);
  
}

void loop() {
  digitalWrite(LED_BUILTIN, LOW);
  while (Serial.available()) 
  {
    digitalWrite(LED_BUILTIN, HIGH);
  }
  digitalWrite(LED_BUILTIN, LOW);
}

nothin happens, its like the TX RX not working at all and of course I connected TX to RX and RX to TX.
need your help mates.
Thanks!

im not an expert, but here are some ideas

Serial.begin is for serial communication over the usb port, to be seen on the serial monitor
so the pins are not relivent

look up Software Serial to see how to communicate via pins

also you may want to add while serial available to the first sketch
that sketch will probably execute so fast you will never see it happen

regards

The following thread has important information about the ESP32C3 serial port.
How to use Serial1 with XIAO ESP32C3

Smartlscar,
Confirmed sample sketches. Please refer to it.
TxRx.zip (1.5 KB)

I just realized the reason that my sketches have been working on Xiao SAMD but not Xiao ESP32C3
is that the SAMD will allow communication over serial to serial Monitor at 9600 baud
however the ESP32 will only allow communication at MINIMUM 115200… what da?

I been messing around with hardware and software serial for hours

hey, first of all thanks for responding.
I tried to upload the ESP32C3 sketch to the board and I got an “exit status 2” error. it’s not the first time that I’m getting this error message, why is that?

you have to press the boot button and reset button at the same time before uploading the sketch for it to be able to go thru with the upload

if you press both buttons on windows… you should hear the boop de boop usb out and usb back in
sound

it is possable to press the button during the compile process and before the upload begin

also if you are still having problems check and press the boot and reset buttons and when you hear the sound check and make sure the com port number has not changed

sometimes the com port number will change when the boot putton cycle happens… for example switching back and forth between com 3 and com 4

this will keep you chasing your tail to make sure the correct port is selected when uploading and opening serial monitor

i have also noticed for the particular program i am running

a second hard reset after upload may be required to get data flowing to the serial monitor