pinMode(2, OUTPUT) − Before you can use one of Arduinos pins, you need to tell Arduino Uno R3 whether it is an INPUT or OUTPUT. We use a built-in function called pinMode() to do this.digitalWrite(2, HIGH) − When you are using a pin as an OUTPUT, you can command it to...
The LED consists of semiconductor crystal(p-type and n-type).If the crystal is energized by a current the semiconductor emits light . There are important consideration in using the LEDs.LEDs work in one direction only,Current goes from the positive side(anode) to the negative side (cathode)....