Why can't my Arduino Redboard communicate with Matlab after uploading codes from the Arduino Software?

1 view (last 30 days)
Hello world,
So I have downloaded the Arduino support package for Matlab and the actual Arduino software for my Arduino (Redboard, Port COM5) to communicate with both programs. The main issue I have been having is when Matlab tries to update my Arduino's information.
Before, I have used the Arduino software to play around with coding and to test if everything works. So far, it has worked with my ports connected and I can upload codes on it. It was not until I needed to move on to Matlab for my class project this semester. Following the correct procedures for downloading the package and making sure I have the correct driver, I type the following code as indicated for connection:
>> a = arduino('COM5','UNO')
Updating server code on board Uno (COM5). Please wait.
So as it's going, the blue light flashes a couple of times but then stops for a long time. Usually, it would also flash red lights indicating that Matlab is communicating with my Arduino. After a couple of seconds, an ERROR message appears:
>> Cannot program board Uno (COM5). Please make sure the board is supported and the port and board type are correct.
This is really odd; when I had one of my friends use the same code for his computer, it would actually work with my Arduino and thus I can use Matlab on mine. But the error happens after I upload code from the actual software into my Arduino. I feel my Arduino is stuck with the Arduino software and thus conflicting with Matlab.
Any ideas on how to fix this will be much appreciated. I have a Windows 10 laptop with Matlab Version R2015b.

Accepted Answer

mirmilo
mirmilo on 16 Jul 2016
I had the same problem. Change the name of your Arduino folder C:\Users\user_name\Documents\Arduino to something else. Then
a = Arduino();
will work fine.

More Answers (1)

Juan Salazar
Juan Salazar on 3 Jun 2016
you may have a pair of virtual ports made by etima software and matlab are trying to access to it be sure you don't have any virtual port y COM5 delete it and make run arduino in matlab again I think it will solve it.
Para habla hispanos
Si ustedes poseen puertos virtuales en COM5 hechos por etima software o por algún otro programa que crea puertos virtuales asegurense que no tengan ningun par ya que matlab no puede sobreescribir el puerto virtual para arduino, puesto que no lo reconoce como puerto.
  1 Comment
Alexander Garcia
Alexander Garcia on 4 Jun 2016
Hello Juan,
I do not have etima software at all and I do not speak fluent Spanish, regardless of my last name.
It seems like Matlab times out for some reason as it is encoding Arduino data into the program for my computer (in which this process consumes memory). I forgot to mention that the Arduino software is Arduino IDE.
There are no "cloud" ports installed just the regular ports with the usb cord. Also, I removed any unused ports hidden in device manager. So there must be an issue with Matlab trying to replace the Arduino IDE coding in the device. I noticed in newer computers, this would work, but for older laptops like my Toshiba, there seems to be an issue (my processor is Intel Core i5).
Thank you though for the input; hopefully, this gets solved.
-Alexander

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!