You are on page 1of 1

DEPARTMENT OF COMPUTER SCIENCE & ENGG.

BHILAI INSTITUTE OF TECHNOLOGY, DURG (C.G.)


DIGITAL ELECTRONICS LAB MANNUAL
EXPERIMENT 5

Aim: To demonstrate a simple LED blink program using Arduino.

Objective: To learn the basic concepts of digital electronics using Arduino.

Component Required:
1. Arduino
2. bread board
3. resistor
4. Led
5. Connecting wire
Procedure:
Step 1. Connect the Arduino to raspberry pi using USB port
Step 2. Connect key board and mouse to raspberry pi.
Step 3. Connect monitor to raspberry pi using HDMI cable.
Step 4. Connect resistor using wire in bread board to pin 13 of Arduino
Step 5. Connect other end of resistor with anode (long leg) of Led in bread board
Step 6. Connect the cathode of led using wire in bread board with GND pin of Arduino

Code
//Blink: Turns an LED on for one second, then off for one second, repeatedly.

void setup() //the setup function runs once when you reset or power the board
{

pinMode(13, OUTPUT); // initialize digital pin 13 as an output.


}

void loop() // the loop function runs over and over again forever

{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Result: ………………………………………………………………………………………………

Precautions:
1. Prepare the circuit before switching on the power supply.
2. Circuit to be checked before switching on the power supply.

Shiv Dutta Mishra, Assistant Professor (C.S.E.). Bhilai Institute of Technology, Durg (C.G.)

You might also like