Real Time GUI for Arduino System

A GUI that controls and monitors the signal of Arduino using Simulink in real time.
968 Downloads
Updated 31 Aug 2017

View License

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
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Block and Blockset Authoring in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0