Reset Serial?

Greetings,

I have an Arduino Mega with two incoming serial signals.

It works great, but I have to disconnect my serial devices until after it boots, otherwise it never comes online.

Can anyone recommend what I can do to avoid having to disconnect the serial devices on boot?

I am just reading the bytes like:

void loop()
{

    if (Serial1.available()) {
      
        byteSer1=Serial1.read();
    
        ?..
    }

    if (Serial2.available()) {
      
        byteSer2=Serial2.read();
    
        ?..
    }
}

Thank you!

I assume that one of these serial inputs is on the hardware serial pin 0. Presumably that's the boot loader getting in on the act, thinking that a sketch is on the way. AFAIK you can't stop it, maybe you'll have to flash your program into a clean chip.


Rob

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1204641836

@Bob:- that link is the auto reset on the main serial connection. This seems to be a problem with two of the extra serial ports on a mega, not the main one which is still called serial (not serial1).

I have an Arduino Mega

Aah the MEGA, sorry didn't spot that. In that case there's no reason for this to happen. Is there a shared interrupt somewhere and the Mega boot loader was never tested with incoming serial on the other ports?


Rob

Weird! I wonder if it has to do with the WiShield.

Is it possible to run Serial1.begin(9600) in the loop()?