I've got a GPS device that does not remember its settings once switched off, and I can't keep it switched on all the time. Its default baud rate that it will always start at is therefore 9600. However, I can configure it through serial to go to a higher baud rate, which is required for a function I wish my program to have.
I can send the change baud signal fine, but then of course I need to change the baud rate of the arduino to match it, otherewise I just get meaningless squiggles.
Can anyone help?
In case that explanation is a bit confusing, here is what I (essentiallu) want to do in code:
mySerial.begin(9600);
mySerial.write("XXXXXXXX"); // string to send to change baud rate
mySerial.write(13); // returns to accept change
mySerial.write(10); // ^^^^^^^^^^^^^^^^^^^
mySerial.begin(38400) // ISSUE: How can I change the baud rate HERE!
Thanks everyone who took time to read this and especially anyone who can help!