MATLAB Answers


Matlab GUI communication with Arduino

Asked by Patrick Avena on 11 Sep 2015
Latest activity Commented on by Walter Roberson
on 15 Sep 2015
How would I display the data from a sensor in Arduino to a graph in Matlab GUI where the x-axis is the pc clock or at least in real time? The sensor reading total is three. At the same time I would like to display the data in a static text


Sign in to comment.

1 Answer

Answer by Geoff Hayes
on 12 Sep 2015

Patrick - presumably you have a function that you wish to call that will read your three sensor data values from the Arduino. An example of something similar to this may be found at
Now, in your GUI, you can call this function periodically so that you can update the graph and static text values. You can do this by creating a timer. See for an example of creating a timer within the GUI that periodically collects data which you can then display in the static text boxes and in the axes.


How would I show the different sensor readings from different static text (Note: The three static text would be showed at once) and at the same time it would be updated periodically? Also, I would like to have a push button that would save the plot in the axes into a .mat file.

Sign in to comment.