Clear Filters
Clear Filters

Sample code run problem for Arduino Mega 2560

2 views (last 30 days)
C Shen
C Shen on 24 May 2013
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 Comments
Kaustubha Govind
Kaustubha Govind on 24 May 2013
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.
C Shen
C Shen on 24 May 2013
Thanks, I forgot to install the package.

Sign in to comment.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!