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

조회 수: 47 (최근 30일)
Arthur Simen
Arthur Simen 2019년 2월 4일
답변: Rohan Kale 2021년 10월 28일
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 https://www.mathworks.com/matlabcentral/discussions/maker/29-baud-rate-of-arduino-hardware-support-package but the suggestions do not work for the latest release.
Would setting the baud rate in the operating system work?
Thank very much.
Arthur
  댓글 수: 4
Walkeronwater
Walkeronwater 2019년 12월 17일
Hi Arthur. I encountered the same problem that I was trying to modify the Baud rate of my Arduino Uno set by the MATLAB Support Package for Arduino. Can I ask how did you solve it?
Rocío Bfdez
Rocío Bfdez 2021년 10월 26일
Hi all! At the end, could you solve it? I have the same problem
Thanks in advance!

댓글을 달려면 로그인하십시오.

답변 (1개)

Rohan Kale
Rohan Kale 2021년 10월 28일
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
https://in.mathworks.com/help/supportpkg/arduinoio/ref/arduino.html

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by