what are diodes for
It allows electricity to go through it only in one direction. Diodes can be used to convert alternating current to direct current (Diode bridge). They are often used in power supplies and sometimes to decode amplitude modulation radio signals (like in a crystal radio). Light-emitting diodes (LEDs) are a type of diode that produce light.