A diode is a discrete component that allows current to flow in one direction only. It is a polarised component with two leads. Aside from being used in electronics, it is also used in public facilities.Traffic lights, scoreboards, and vending machines are examples of diode-dependent devices.