MKR1300 Standalone Transmit and Receive

Hi all.

A very strange problem:

When i use a modify version of the Lora Send and receive program, modify because i want to send message directly by a sensor and not by the serial port command line.

So when i plug the USB cord on my laptop, every things are ok. I send and receive my data. But when i plug only on a power. The mkr1300 don't send data.

Attach my program.

LoraSendAndReceive_objeniousV3.ino (1.8 KB)

try commenting out the

 while (!Serial);

which will hang looking for a serial connection