how to display value from arduino then display in the app design

2 views (last 30 days)
i have some a question, if i want to display the result detection of arduino in the app design. how to get all the data then to display and what the syntax
this is my code for communication serial app design with arduino
properties (Access = private)
% Serial Connections
serial
% Description of color
GREEN_COLOR = 'GREEN' %[0 1 0]
RED_COLOR = 'RED' %[1 0 0]
end
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: Connect
function ConnectButtonPushed(app, event)
app.serial = serial(app.PortList.Value);
fopen(app.serial);
app.ConnLamp.Color = app.GREEN_COLOR;
end
% Button pushed function: Disconnect
function DisconnectButtonPushed(app, event)
stopasync(app.serial)
fclose(app.serial);
app.ConnLamp.Color = app.RED_COLOR;
end
% Button pushed function: Refresh
function RefreshButtonPushed(app, event)
if license('test', 'instr_control_toolbox')
delete(instrfind);
p = instrhwinfo('serial');
app.PortList.Items = p.AvailableSerialPorts;
end
end
end
this the input of arduino
float value_temperature;
float voltage_ph;
float value_ph;
float voltage_turbidity;
float value_NTU;

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!