Arduino support package baud rate
5 ビュー (過去 30 日間)
古いコメントを表示
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!
0 件のコメント
回答 (1 件)
Madhu Govindarajan
2015 年 12 月 11 日
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 件のコメント
Samuel Louise
2019 年 2 月 6 日
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
2019 年 12 月 17 日
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/254825/boards.png)
参考
カテゴリ
Help Center および File 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!