How to flash app.lamp object in App designer
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Achille Brice NOUBISSI
el 18 de Nov. de 2018
Respondida: Praveen Reddy
el 14 de Mzo. de 2023
Hi everybody,
I'm doing project with arduino and I want to use app designer to flash a led and app.lamp object at the same time, transmit and receive data by USB port and trace this data from a sensor.
It's my first time I'm going to use App designer and would like to know at first how to flash app.lamp object.
If you have links to examples that can help me understand app designer do not hesitate to send them.
Thank you!
0 comentarios
Respuestas (1)
Praveen Reddy
el 14 de Mzo. de 2023
Hi Achille,
I understand that you want to change the operational state of lamp object. You can use “Enable” property to on/off the lamp. Attaching a small code for your reference.
%Call Back function of a switch component
function SwitchValueChanged(app, event)
value_S2 = app.Switch.Value;
if strcmp(value_S2,'On')
app.Lamp.Enable='on';
else
app.Lamp.Enable='off';
end
end
Please refer to the MATLAB Documentation to know more:
0 comentarios
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!