Interfacing LED with Arduino & LED Blinking Circuit
(Nano , Uno , Mega)
Led blinking is the beginner and very easy step to start your projects with arduino.
Lets get started
- Arduino (Nano or UNO or Mega)
- Resistor (220 or 1K Ohm)
- Jumper Wires
First identify the anode (+ ve) leg and the LED cathode (-ve).
Following the diagram gives a clear LED view
Now connect one end of resister to the 5v and other end to the positive leg of LED .Connect Negative leg of LED connect to the pin 13.
Arduino Code for LED Blinking:
int ledpin = 13; //pin where led LED Ground connect
pinMode(ledpin, OUTPUT); //Select pin 13 as a output
digitalWrite(ledpin, LOW ); //at start LED low
delay(1000); //1 second delay
digitalWrite(ledpin, HIGH); //LED pin high and LED turns On
delay(1000); //1 second Delay