Sample code run problem for Arduino Mega 2560

2 次查看(过去 30 天)
I just installed Arduino package using Mathwork "targetinstaller". And try to run its sample code in "help->"supplemental software"->Example->"Target for use with Arduino Mega 2560 hardware"
I got this error when I enable external mode and use tools->"run on target hardware"->"run"
The build failed with the following message: "C:\MATLAB\Targets\R2012b\arduino-1.0\hardware\tools\avr\utils\bin\make": Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4217b3)
Another problem, my arduino board is connected to USB COM3. But when I run this in Matlab command window, I got this error. I changed the current folder to "C:\MATLAB\Targets\R2012b\arduinomega2560", it does not work.
Any help will be appreciated.
a=arduino('COM3')
Undefined function 'arduino' for input arguments of type 'char'.
  2 个评论
Kaustubha Govind
Kaustubha Govind 2013-5-24
For the second error, you need to run the install_arduino.m file that is in the downloaded package. This makes sure that the folder containing arduino.m is added to the MATLAB path.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by