سلام، در این برنامه چطور میشه کاری کرد تا نیازی به فشردن کلید برای نمایش دیتا نباشه؟
یعنی به صورت خودکار دیتای دریافتی نمایش داده بشه؟

کد:

function varargout = untitled(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @untitled_OpeningFcn, ...
                   'gui_OutputFcn',  @untitled_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end


if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before untitled is made visible.
function untitled_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);


% --- Outputs from this function are returned to the command line.
function varargout = untitled_OutputFcn(hObject, eventdata, handles) 
varargout{1} = handles.output;


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
s=serial('COM21','BaudRate',9600);
fopen(s)
readasync(s);
out=fscanf(s);
set(handles.text1,'string',out);
fclose(s);
delete(s);


% --- Executes during object creation, after setting all properties.
function text1_CreateFcn(hObject, eventdata, handles)