How to set baud rate in the MATLAB® Support Package for Arduino®

31 views (last 30 days)
Arthur Simen
Arthur Simen on 4 Feb 2019
Answered: Rohan Kale on 28 Oct 2021
I know that there are many posts on the subject of how to set the baud rate for serial connections in the MATLAB Support Package for Arduino but I have not seen a definitive solution.
It seems to default to 9600. There was some guidance posted here but the suggestions do not work for the latest release.
Would setting the baud rate in the operating system work?
Thank very much.
Rocío Bfdez
Rocío Bfdez on 26 Oct 2021
Hi all! At the end, could you solve it? I have the same problem
Thanks in advance!

Sign in to comment.

Answers (1)

Rohan Kale
Rohan Kale on 28 Oct 2021
Hi Arthur,
The BaudRate can be specified while creating an arduino object. The BaudRate defaults to 115200.
For example,
>> a = arduino('COM5','Uno', 'BaudRate', 115200);
>> a.BaudRate
Refer to the documentation page of arduino to know more about the option at

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!