Change Serial Speed

Hi everybody and a happy 2012!

i want to change the serial speed and am not shure if this way is right:

void setup()
{
serial.begin 9600;
configure_serial_device(); // talk to slave at 9600 - sentence- switch to 57600
delay 500;
serial.begin 57600;
}
void loop();
{
somestuffwithserialdeviceathighspeed();
}

Any suggestions if this is O.K. or if it has to be done in other manner?

Thanks for reply !

I'm thinking

Serial.begin(9600)
....
Serial.end()

Serial.begin(57600)

That said, I think you're better off using software serial, or a Mega. Because both devices will be listening regardless of baud rate, and you WILL get bad juju for results.

A 4 byte packet looks VERY different at 9600 baud and 57600 baud, for example.

Great !

thanks!

It is a 88 with an MTK3329 .No usb-Stuff intermediate.
MTK switches speed without respect to the commanding device.
Already tested.

Delay 500 and restart of serial with new value should do the Trick.