Pages: [1]   Go Down
Author Topic: Changing Baud Rate on the fly  (Read 374 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,What is wrong with this, is it possible to change baud rate? Im using a Mega1280 and i want to change the baud rate of the GPS from default 4800 to 57600 but all i get is rubbish in the Arduino debug window, it works fine if i connect the gps to a windows terminal
Code:
  Serial1.begin(4800);
  Serial1.println("$PSRF100,1,57600,8,1,0*36");
  Serial1.begin(57600);
  Serial.begin(9600);
Thanks
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12290
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Try calling Serial1.end(); when you are finished communicating at 4800 baud.
Logged

0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, Will do
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it works fine if i connect the gps to a windows terminal

When you use the Terminal window, do you type the command a few microseconds apart? That is your answer.
Logged

Pages: [1]   Go Up
Jump to: