Matlab GUI communication with Arduino
조회 수: 3 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Geoff Hayes
2015년 9월 12일
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 http://www.mathworks.com/matlabcentral/answers/213364-receive-value-in-matlab-gui.
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 http://www.mathworks.com/matlabcentral/answers/178682-collecting-a-variable-every-two-minutes 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.
댓글 수: 3
Walter Roberson
2015년 9월 15일
Your question about three different static texts is answered at http://uk.mathworks.com/matlabcentral/answers/234904-how-do-i-display-different-sensor-readings-from-aduino-on-different-static-texts-on-matlab-gui
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!