Experiment No: 01
Experiment Name: Introduction to Arduino Setting up the programming environment and basic introduction to the
Arduino micro-controller, Arduino IDE and Sketch Overview.
Theory:
Arduino is an open-source electronics platform designed for easy prototyping and hardware control. It consists of an
Arduino board (such as Arduino Uno) and the Arduino IDE (software used to write and upload code). An Arduino
sketch is the program written in the IDE and uploaded to the board. Each sketch contains two essential functions:
1. setup() → runs once at the beginning to initialize settings.
2. loop() → runs repeatedly to execute the main program logic.
This experiment introduces the Arduino platform, explains the role of the IDE, and demonstrates a simple “Blink”
program that makes the onboard LED blink at 1-second intervals.
Procedure:
1. Install Arduino IDE: Download from [Link] and install it on your computer.
2. Connect Arduino Board: Plug the Arduino Uno board into the computer using a USB cable.
3. Open Arduino IDE:
I. Go to Tools → Board → Select “Arduino Uno”
II. Go to Tools → Port → Select the correct COM port
4. Write the Sketch (Program):
void setup()
pinMode(13, OUTPUT);
void loop()
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
5. Upload the Program:
I. Click on the Upload button in the IDE.
II. The onboard LED on pin 13 should start blinking.
Conclusion:
In this experiment, we successfully set up the Arduino programming environment, learned the structure of an
Arduino sketch, and executed the basic “Blink” program. This provided a foundation for understanding how Arduino
can control hardware through simple coding.
Experiment No: 02
Experiment Name: Implementation of LED light blinking using Arduino
Theory: Arduino can control digital pins to turn devices ON and OFF. By sending HIGH and LOW signals to an LED
connected to pin 13 (or onboard LED), we can make it blink with a time delay.
Procedure:
1. Connect an LED to pin 13 with a resistor (or use the onboard LED).
2. Open Arduino IDE and write the blink code.
3. Upload the code to the Arduino board.
4. Observe the LED blinking.
Code:
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
Output: The LED continuously blinks ON and OFF with a 1-second delay.
Conclusion: We learned how to control an LED using Arduino digital pins and delay functions to create a
blinking effect.
Experiment No: 03
Experiment Name: Implementation of 16×2 LCD Display (16-pin) with Arduino
Theory: A 16×2 LCD can display 16 characters per line on 2 lines. It is commonly used to display messages, sensor
values, or system status. It communicates with Arduino using parallel data pins (RS, E, D4–D7) and requires the
LiquidCrystal library for programming.
Procedure:
1. Connect the 16×2 LCD to Arduino (typical 4-bit mode):
I. RS → Pin 12
II. E → Pin 11
III. D4 → Pin 5
IV. D5 → Pin 4
V. D6 → Pin 3
VI. D7 → Pin 2
VII. VSS → GND, VDD → 5V, V0 → Potentiometer (for contrast), RW → GND
VIII. LED+ → 5V, LED- → GND
2. Open Arduino IDE and include LiquidCrystal.h.
3. Write and upload the LCD display code.
4. Observe the display showing messages.
Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
[Link](16, 2);
[Link]("Hello, World!");
void loop()
[Link](0, 1);
[Link]("RG Innovations.");
}
Output:
The LCD displays:
Hello, World!
RG Innovations.
Conclusion: We successfully interfaced a 16×2 LCD with Arduino and displayed text using the LiquidCrystal library.
This experiment shows how Arduino can output messages on an external display.
Experiment No: 04
Experiment Name: Implementation of 16×2 LCD Display (with I2C) using Arduino
Theory: An I2C module reduces the number of Arduino pins needed to control a 16×2 LCD (only SDA & SCL pins are
used). The LiquidCrystal_I2C library is required to send data via the I2C protocol.
Procedure:
1. Connect I2C LCD to Arduino:
I. VCC → 5V, GND → GND
II. SDA → A4, SCL → A5 (for Arduino Uno)
2. Install LiquidCrystal_I2C library in Arduino IDE.
3. Upload the program and observe the display.
Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x27
void setup()
[Link]();
[Link]();
[Link](0,0);
[Link]("Hello, I2C LCD");
void loop()
[Link](0,1);
[Link]("Arduino Rocks!");
Output: LCD displays: I2C LCD DISPLAY WITH ARDUINO
Conclusion:
Using the I2C interface, a 16×2 LCD can be easily controlled with only 2 Arduino pins, making connections simpler
and more efficient.