Real Time GUI for Arduino System
This project used Simulink with Arduino Hardware Support Package to control the behavior of Arduino UNO and observe the analog signal read from the similar Arduino UNO. The simulation was ran in External mode for infinite time to make it real time. The Simulink was then linked to a GUI so that the system can be controlled and observed in the easier interface.
The GUI controls the parameter of Simulink blocks using set_param function. However, the crucial part was to send output signal from the Simulink to the GUI in real time. I have used a S-Functions as a sink in the Simulink to store the output value in an m-file. This m-file was then being read by the GUI and display the changes value in the real time as the value in the m-file changes.
Before we start executing the files, here is the brief overview of the system. The PC must be connected to the Arduino UNO R3 through USB cable. The Arduino will controls an actuator using SPI Communication pin 10 with the power on/off controls through digital pin 8. This actuator will give voltage changes of an object. This analog voltage changes is then being measured by a sensor through pin A5.
The files attached should be placed in the same path. Then, we can run the IMDC.m using MATLAB to initialize the GUI and the Simulink diagram. Once the user click on the TURN ON push button in the GUI, the Simulink will starts running the simulation in real time. The user can play around with the other buttons to see the behavior of the system through GUI.
Cite As
Muhammad Naqiuddin Nazali (2025). Real Time GUI for Arduino System (https://www.mathworks.com/matlabcentral/fileexchange/64295-real-time-gui-for-arduino-system), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |