Can't change baude rate using Arduino Nano3.0

2 次查看(过去 30 天)
Hi
I want to use an arduino nano 3.0, I download the Supported Package for Arduino and i found the main problem is the CH340 chip that mi arduino uses. It chip cannot handle baudrate greater than 230400 (matlab uses 921600), so I have to change the baude rate less than this value.
I found two ways to do it, but unfortunately none works.
a) find in the path C:\MATLAB\SupportPackages\R2015a\arduinoio\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal the field calls boards.xml and change the value of the baude rate, but I haven't this file in my download Packag
b) Change de baude rate using this comma
>> ccodertarget.arduinobase.registry.setBaudRate(gcs)
But I cannot understand how can i use it. Because if I set this command in my terminal (MATLAB) and errors appears: Unable to resolve the name codertarget.arduainobase.registry.setBaudRate
I read the information there:

回答(1 个)

Arun Kumar
Arun Kumar 2020-4-13
Hi Ethan,
The api:
codertarget.arduinobase.registry.setBaudRate(gcs)
should work fine as mentioned in the following answer:
There's a type in the command that you typed.
Please copy and paste the above command.
Thanks,
Arun

类别

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