Send a program to Arduino through Matlab

5 views (last 30 days)
Hi, I have an Arduino program that controls an IR led to trigger the shutter. I want to be able to control it with a Matlab GUI, but I haven't yet found anything. I have tried ArduinoIO, but it only lets me control basic things from Matlab, it doesn't let me upload an already compiled Arduino code from Matlab and then modify some of the variables with a GUI, which is what I want. Thanks.

Answers (2)

Walter Roberson
Walter Roberson on 17 Nov 2015
If you are not planning to create a web server on the arduino, then to control the variables through a GUI you will need to run the GUI on the MATLAB side and it will need to send commands to the Arduino side, which would have to be programmed to receive the commands and alter the variables accordingly.
  1 Comment
Francisco Ardevol
Francisco Ardevol on 18 Nov 2015
Edited: Francisco Ardevol on 18 Nov 2015
Right before posting this question, I went to that link and tried the solution given there (even if I couldn't change the variables afterwards, just to load up the program), but I don't have a line that looks like that. On the other hand, if I were to do what you say is there any kind of guide to do that? or could you give me some pointers? Also, would this be easier than creating a web server? Thanks

Sign in to comment.


Madhu Govindarajan
Madhu Govindarajan on 18 Nov 2015
I think the best way to go about this issue would be to write the MATLAB equivalent of the Arduino sketch because Arduino IO is in essence downloading a server code and communicating with the board. Because of this server code already running on the board, you won't be able to download another sketch at the same time. If you are using the latest support packages from MATLAB and don't have IP that needs protection you can post your Arduino sketch here and volunteers might be able to help you with the MATLAB script/function that you will need.

Categories

Find more on MATLAB Support Package for Arduino Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!