How to connect LED and resistor?
Connect one end of the LED to the positive terminal of the power supply and the other end to the negative terminal of the power supply through a resistor. Be careful not to connect the positive and negative poles of the LED directly, otherwise the LED will burn out.