It’s a semiconductor device that emits light when an electric current passes through it.
Things to do
Connect Annode (+) part of Led to Digital pin of Arduino i.e 13
Connect Cathode(-) part of Led to Groundpin of Arduino
Interfacing Diagram
Interface a microcontroller, like an Arduino, with external components, you typically use a combination of wiring and programming. Here’s a short overview of the basic steps:
Identify the components you want to interface with the Arduino, such as sensors, LEDs, motors, etc.
Determine the electrical requirements of these components (voltage, current, signal levels).
Connect the components to the appropriate pins on the Arduino board using jumper wires, breadboard, or soldering depending on your setup.
Write a program (sketch) in the Arduino IDE to control and interact with these components. This involves configuring pins, reading sensor data, and sending signals to control outputs.
Upload the program to the Arduino board via USB.
Test and debug your setup, making adjustments as necessary to ensure proper functionality.
Task
Glow Led On & Off
Code
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // turn the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off delay(1000); // wait for a second