Clear Filters
Clear Filters

Arduino support package baud rate

5 views (last 30 days)
Christopher
Christopher on 11 Dec 2015
Commented: Walkeronwater on 17 Dec 2019
Hello,
When using the arduino support package, is it possible to increase the baud rate within MATLAB from 9600 to 115200? I am aware that this can be done in the Arduino program, sent to the serial port and read by MATLAB, but I am not sure how to make this work within MATLAB and allow for simultaneous control of the digital out pins.
Thanks for your help!

Answers (1)

Madhu Govindarajan
Madhu Govindarajan on 11 Dec 2015
I am not sure which version of the support package you are using, but I am working with 15a and here is a file that might help you - boards.xml
Try this in MATLAB (it is from the doc) so might work in the older versions too.
>> edit(fullfile(arduinoio.SPPKGRoot, '+arduinoio', '+internal', 'boards.xml'))
If not here is how I got to it on my installation. Support package installation area - C:\MATLAB\SupportPackages\R2015a
The location of the file inside the support package installation area - arduinoio\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal
so the actual path - C:\MATLAB\SupportPackages\R2015a\arduinoio\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal
If you edit the boards.xml file and change the baud rate it might work.
Also ensure you clear classes in MATLAB after updating the file.
  3 Comments
Samuel Louise
Samuel Louise on 6 Feb 2019
Hi Christopher, I am currently using 2018a, and from what I have seen this happens due to the Matlab communicating with the Arduino faster than what it can operate, such as trying to overclock the speed. I am currently using the MEGA2560 Arduino Board.
Walkeronwater
Walkeronwater on 17 Dec 2019
Hello, I am using MATLAB 2019b and I am trying to modify the Baud rate of my arduino Uno set by MATLAB support package. I found the .xml file 'boards.xml' but there were no content related to baud rate.
boards.xml
boards.png

Sign in to comment.

Categories

Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!