Call Us Now
0242159130 | 0546096840
Up to 2% reward

For new all Customers

Delevery schedule

We deliver  the same day through VIP bus parcel Service in Ghana

Discount on order gift

Save ¢10.00 when you spend ¢600+! 

how to Blinking LED with Arduino uno

how to Blinking LED with Arduino uno

Experimental 1

In this tutorial, we will be interfacing a single LED Bulb with Arduino UNO R3 Board (Arduino UNO) and learn

to blink an LED ON and OFF with a delay of a second, using Arduino Microcontroller Board.

Hardware Required

1 x 5MM LED Bulb Red

1 x Arduino UNO R3 Board

1 x USB cable

1 x breadboard

1 x 220Ω resistors (1Watt)

2 x jumper wires

Principle of operation

In this experiment,we will program the Arduino's GPIO output high level(+5V)and low level (0V), and then make the LED which is connected to the Arduino’s GPIO flicker with a certain frequency

What is an LED ?

The LED is the abbreviation of light emitting diode. It is usually made of gallium arsenide, gallium phosphide semiconductor materials. The LED has two electrodes: a positive electrode and a negative one.

It lights up only when a forward current passes, and it can flash red, blue, green, yellow, etc. The color of the light depends on the material it is made. In general, the drive current for LED is 5-20mA.

Therefore, in reality it usually needs an extra resistor for current limitation so as to protect the LED

What is Resistor?

The main function of the resistor is to limit currents. In the circuit, the character ‘R1’ represents resistor, and the unit of resistor is ohm(Ω). 

Key function

*setup() The setup()function is called when a sketch starts.Use it to initialize variables, pin modes, start using libraries, etc. The setup function will only run once, after each power up or reset of the Arduino board.

* loop() After creating a setup() function, which initializes and sets the initial values, the loop() function does precisely what its name suggests, and loops consecutively,allowing your program to change and respond. Use it to actively control the Arduino board.

*pinMode() Configures the specified pin to behave either as an input or an output. As of Arduino 1.0.1, it is possible to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pullups.

*digitalWrite() Write a HIGH or a LOW value to a digital pin. If the pin has been configured as an OUTPUT with pin Mode(),its voltage will be set to the corresponding value: 5V (or 3.3V on 3.3V boards) for HIGH, 0V (ground) for LOW.

If the pin is configured as an INPUT,digitalWrite() will enable(HIGH) or disable (LOW) the internal pullup on the input pin. It is recommended to set the pinMode() to INPUT_PULLUP to enable the internal pull-up resistor.

*delay() Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 2000 milliseconds in a second.)

Experiment code

//File name:   Experiment 1

//Description:  blink an LED .



//Author: Okudzeto osei prince

//Date: 2019/04/01 

int LEDPin=2; //definition digital 2 pins as pin to control the LED Bulb(Note 'int' is variable type).

void setup()


    pinMode(LEDPin,OUTPUT);    //Set the digital 2 port mode, OUTPUT: Output mode


void loop()


    digitalWrite(LEDPin,HIGH); //HIGH is set to about 5V pin2

    delay(1000);               //Set the delay time, 1000 = 1S

    digitalWrite(LEDPin,LOW);  //LOW is set to about 5V pin2

    delay(1000);               //Set the delay time, 1000 = 1S

Compile the program and upload to Arduino UNO board Now you can see the LED blinking.

Add Comment