Problem with battery


My code works grate when the Arduino mkr 1200 is connected to the usb of the mac, but it does not work with the 2xAA batteries. With the usb and also with the batteries i could see the led of a GPS module connected to the board, but the Sigfox message never arrive to sigfox backend with the batteries. The debug mode is not enabled in the code.

can someone help me?


After a lot of hours I could resolve the issue, it was because the code, you have to change the:

while (!Serial) {}


while (!Serial) {
  if (waiting> 9) {
    debug = false;

Before the Arduino was search of the Serial connection, and with the battery there is not that connection. With the new code it works good.