Why can't my Arduino Redboard communicate with Matlab after uploading codes from the Arduino Software?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
mirmilo
2016-7-16
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.
0 个评论
更多回答(1 个)
Juan Salazar
2016-6-3
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.
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!