Led Interfacing With Arduino Board

Led Interfacing With Arduino

LED stands for “Light-Emitting Diode”. LED is a kind of diode that works in forward bias. Several materials can be used to make LEDs, such as aluminum gallium arsenide (AlGaAS) or aluminum gallium indium phosphide (InGaAlP) and gallium arsenide (GaAs). These special materials are used for LEDs but Gallium Arsenide (GaAs) is mostly used in LEDs. Because the color of the LED is directly related to the material. The type of semiconductor used in the device determines the bandgap energy that is used to make photons of different wavelengths. The wavelength is directly related to the color of the LED.

LED interfacing is one of the beginner-level Arduino interfacing that will give you an idea of how to assign pins in Arduino programming and how to use that pins. There are different types of LEDs available in the market that can be used to interface Arduino. Let’s move on to the interfacing part.

leds

 

Components Required :

  1. One Arduino UNO
  2. Computer with Arduino IDE
  3. USB to Arduino connecting Cable
  4. Jumper Wires
  5. 220 W Resistor
  6. One LED
  7. One Breadboard

 

Circuit Diagram :

led-interfacing-with-arduino

 

Steps to Follow:

  1. Establish the Circuit Mentioned.
  2. Open Arduino IDE.
  3. Click on File.
  4. Go to New. – A new File will open
  5. Remove the Pre-Written code.
  6. Paste the code given in the “CODE Section”
  7. Check whether your UNO has been detected by the ID by going to Tools.
  8. Click on Port – Select the COM-Port on which Arduino UNO is detected.
  9. Verify the Sketch by Clicking on the TICK icon.
  10. Once, the sketch is verified, Upload the sketch using the ARROW icon.

 

Code :

// the setup function runs once when you press reset or power the board
void setup() {
  pinMode(D2, OUTPUT); // initialize digital pin LED_BUILTIN as an output.
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(D2, HIGH); // turn the LED on (HIGH is the voltage level)
}

 

Leave a comment