Go Down

Topic: Change baudrate with a small "physical buttonswitch"? (Arduino UNO) (Read 115 times) previous topic - next topic

myname

Hi,

Is it possible to make a code that will change the baudrate dempending on a "physical buttonswitch"?
DigitalIn1 active -> 4800
DigitalIn2 active -> 9600
DigitalIn3 active -> 19200
.......

I'm thinking of making an arduino that will print out(to a 2-3" lcd screen) data that comes on different baud rates.

Robin2

Yes.

After you detect the switch you can do Serial.end() followed by Serial.begin(newBaudRate)

You should have some system so you can tell what is the current baud rate - otherwise you will end up tearing your hair out because you need the same baud rate at both ends of the wire.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up