fbpx

Blink led using Arduino Uno

Led have two pins, Anode(+) and Cathode(-), Anode connected with arduino P12 pin and Cathode is connected with 5v in Series with 220 ohm resistor.

Hardware Required

  • Led.
  • 220 ohms Resistor
  • Arduino uno.

Circuit

Code

int led = 13;
void setup()
{
pinMode(led, OUTPUT);      // Initilize LED gpio as output
}
void loop()
{
digitalWrite(led, HIGH);    // LED on
delay(1000);                // wait for a second
digitalWrite(led, LOW);     // LED off
delay(1000);                // wait for a second
}

Leave a Reply

Your email address will not be published. Required fields are marked *