Arduino does not work without serial monitor

0

I have a problem with my Arduino Due, I have a GPRS SIM900 module connected to the Serial1, and an Xbee to the Serial0.

The code runs perfectly while I have the serial monitor open, but when I feed the Arduino Due on the jack and I do not connect the arduino by USB, since the arduino project is supposed to be in an isolated area with batteries, it does not nothing. (The SIM900 feeds it with its own power supply, and the Xbee goes with the Arduino Due, the problem is not the source, since it gives 1 A, while the USB port gives maximum 0.5A, so if it worked with the USB, with the power supply also).

If someone can help me, I would appreciate it.

Greetings.

    
asked by Rolaro 10.05.2017 в 23:41
source

1 answer

0

Put the code you use, so it will be easier to help you. If you find something like this

while(!Serial.available())

It may be the error you're looking for. That for the execution until the serial is not ready:)

    
answered by 29.05.2017 в 08:58