Blinking of LED with Arduino

Steps to connect a led with arduino :
  • Take a led and first check its terminals for positive and negative.
  • Among the two terminal ,the one with the short leg is negative terminal and the one with the long leg is positive one.
  • Another way to find the terminal of led is to have a close look on the head of each one, the one with flat head is negative and pointed one is positive.
  • Now take an arduino and upload the code given with the tutorial.
  • The default led with arduino will glow according to the code given.
  • Now connect the led with its positive terminal to pin number 13 and  negative terminal to ground.
Link Blinking Image Arduino
Arduino Code for LED Blinking: DOWNLOAD
int led = 13;
void setup()
{
pinMode(led, OUTPUT);
}
void loop()
{
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

0 Comments