LED blinky: first code in Arduino


Make an LED blink at different time interval using Arduino

Resources needed

SNo Component Quantity
1 Arduino uno 1
2 LED 1
3 Jumper wire 2
4 Breadboard 1


cod screen shot


void setup() {
pinMode(4, OUTPUT);
void loop() {
digitalWrite(4, HIGH);
digitalWrite(4, LOW);

Below is the copy of working code

cod screen shot

Code Explanation

We setup our digital pin 4 as output pin under our void setup() function.Our LED is connected to digital pin 4. Under our void loop() function we switch our digital pin between high and low using digitalWrite(); function. we create a delay between the switch using delay(); function.