UART not working

Hi guys,

I'm trying some Arduino Micro connected to a LoRa module and I've spent the last 2 days trying to make a simple task.
This is the code

void setup() {
  Serial.begin(9600);
  while (!Serial) {}
}
    
void loop() {
  Serial.println("Hello From Arduinno");
  delay(3000);
}

Very basic, but not working on the Micro. I've tried the same code on Arduino Uno and it works perfectly, like it should. But on Arduino Micro I can't receive anything, then I've tried something different. On the same breadboard I've built both project, on the UNO and on the Micro, sharing the same power from a battery, and magically the Micro started to work !
I'm really confused now, I don't thing I need to use pullup resistor for the RX/TX pins, but maybe I'm wrong.
Did anyone had the same experience with this problem ?
By the way, I have several radio modules and several Micro and I've tried all of them .... I'm going crazy !
Do you have any suggestion ?
Thanks for everybody's time

Just a WAG, but for a Micro (a 32u4 based board), isn't Serial to talk to the USB, and Serial1 is to talk to the Rx/Tx pins on the header?

This doesn't make sense to me.
You didn't post any wiring, how is module connected to micro?
Serial on micro is for usb, Serial1 for pins 0/1 .

How, and to which LoRa module? Please post a wiring diagram (hand drawn is preferred).

1 Like

Hi guys,

sorry I'm new here and I should have been more accurate.

This is my LoRa module

And this is how I connected it

I’ve tried to use Serial1 to transmitr, I’ve also tried to use the 5V insted of the 3.3V from the Micro … It doesn’t send anything ever. Same connection works fine on Arduino UNO

Thanks

Your ridiculously tiny image hints that you have rx-rx and tx-tx wiring. You need to cross them rx-tx, tx-rx.

1 Like

Sorry, the picture is wrong but my wires are actually crossed on my Micro. Nothing coming out of it

I have the same exect circuit replicated on Arduino UNO and Arduino Micro, it works only on UNO

It is a good idea to post the correct picture. Hand drawn is preferred.

Did you solder the connections or use a breadboard?

Post a picture of the actual setup.

I found the problem, nothing about cabling or connection. When I changed from Serial to Serial1 I forgot to change it in this line

while (!Serial) {}

So I guess it was stuck in that loop.

Thanks everyone for your help and suggestions. Next time I’ll also provide a better drawing

And preferably your actual code.
Nice you mede it!