Write a program to Blink default Light Emitting Diode(LED) on Arduino board with the delay of 2 sec.
Last Updated : 16 Jul 2025
Solution:
void setup(){
pinMode(13,OUTPUT); // LED = pin 13
}
void loop(){
digitalWrite(13,HIGH); // Turn on the LED
delay(2000); // Wait for 2 seconds
digitalWrite(13,LOW); // Turn off the LED
delay(2000); // Wait for 2 seconds
}
Report an error
Meanwhile you can watch this video
Watch Video