Borrar filtros
Borrar filtros

How to add LED in GUI?

12 visualizaciones (últimos 30 días)
Hemanth
Hemanth el 8 de Dic. de 2011
Comentada: Huy Le Van el 30 de En. de 2021
Hi I am developing a gui for which when the input is provided by user I should be able to show him a green LED glowing that the signal is received, if not a red LED glowing. But i am not able to find an LED. Can someone please let me know how to add an LED in GUI.
regards T. Hemanth

Respuestas (3)

Walter Roberson
Walter Roberson el 8 de Dic. de 2011
There are no LED in GUIs. LEDs are hardware.
There are a lot of different ways to control external hardware. Most of those ways cannot meet the programmer's original expectations of what they would like to do.
  1 comentario
Walter Roberson
Walter Roberson el 9 de Dic. de 2011
Graphics are not able to "glow". You will need to use hardware.
Relevant material:
http://www.mathworks.com/help/toolbox/gauges/numericdisplays.html
http://www.mathworks.com/matlabcentral/linkexchange/links/2992-output-webcam-to-led-using-matlab
http://www.mathworks.com/matlabcentral/answers/3874-gui-interface-with-arduino
http://www.mathworks.com/matlabcentral/answers/22387-leds-and-speakers-controlled-with-matlab

Iniciar sesión para comentar.


Daniel Shub
Daniel Shub el 8 de Dic. de 2011
Are you okay with square "LEDs" that don't flicker at all and are really uniform? You can make a text box and set its background color to be green/red and the string to be blank. If you want circles you could use an image. Beyond that you might need to video an actual LED and play the video ...
  4 comentarios
Hemanth
Hemanth el 9 de Dic. de 2011
Presently i did use squares with G&R colours as background but when the signal is provided it should indicate that by glowing, which i am not able to do.
Daniel Shub
Daniel Shub el 9 de Dic. de 2011
You really should add this information to your question.

Iniciar sesión para comentar.


Daniel Shub
Daniel Shub el 9 de Dic. de 2011
It seems the key part of the question (based on a comment to my previous answer) is to get the "LED", which I think is being implemented as a uicontrol textbox, to flicker or glow. There is no good solution.
If two states are good enough (LED on and LED off), you could define two different colors of "green" and two different colors of "red" and switch between them.
If you want it to be more dynamic you could use a timer and change the color dynamically.
The best is probably to video a real LED and play that back as a movie.
  1 comentario
Huy Le Van
Huy Le Van el 30 de En. de 2021
HI everybody.
who have method ?

Iniciar sesión para comentar.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by