Home > Net >  Consult: vb.net how to control the LED and off
Consult: vb.net how to control the LED and off

Time:11-04

Consult: vb.net how to control LED lights on or off, there is a button, a TEXTbox, I in a text box input values will trigger the LED light, how to implement this code, you look great god, thank you very much,,

CodePudding user response:

This watch you q is true or false,
If fake an if

If true, then tell us the following of is what,
A relay controller?
A PLC?
An AD module?
A single chip?
A special panel?

CodePudding user response:

Need an IO

CodePudding user response:

False, I like, but also can regulate a variety of color...

CodePudding user response:

IF it is practice, an IF... THEN...
If it is a practical application, it should be, and the upper machine control LED lamp is not, VB.NET is a PC to control, as a player put up to 0000 0000 representatives, from VB.NET only responsible for the IO (COM/USB/RJ45) sends a 0000 0 0001 is open, the VB.NET is responsible for sending 1,

CodePudding user response:

The simulation? It is picturebox imitate your lamp, two switch images,

CodePudding user response:

Simulation control
The button click event to add
If text1. Text="1" then
Msgbox (" LED light ")
The else
Msgbox (" LED lights ")
End the if

CodePudding user response:

There is a GaugeControl DevExpress component, the component with traffic lights, LED can directly use the simulation
It is very easy to control

CodePudding user response:

reference 4 floor HuaYunZhi's response:
IF it is a practice, an IF... THEN...
If it is a practical application, it should be, and the upper machine control LED lamp is not, VB.NET is a PC to control, as a player put up to 0000 0000 representatives, from VB.NET only responsible for the IO (COM/USB/RJ45) sends a 0000 0 0001 is open, the VB.NET is responsible for sending 1,

Is the machine

CodePudding user response:

This need hardware

CodePudding user response:

Buy a like called switch module, and through a serial port programming
  • Related