Untitled Document
Untitled Document
NAME----RIDDHI CHAKRABORTY
ROLL------22051875
EXPERIMENT--1
Explore basic digital output by controlling the blinking of onboard and external
LEDs using an Arduino Uno/Mega.
Gain practical experience with circuit design, coding, and interfacing components.
COMPONENTS REQUIRED:-
● HARDWARE:-
1. Arduino Uno board
2. LED (Light diode)
3. Resistor (220 ohms)
4. Breadboard
5. Jumper wires
6. USB cable
● SOFTWARE:-
1. Arduino IDE
THEORY:-
Both Arduino Uno and Arduino Mega are popular microcontroller boards widely
used for electronics prototyping and hobbyist projects. While they share similar
functionalities, they differ in key aspects like memory, pin count, and size, making
them suitable for different applications.
Basic Theory:-
1.Arduino Mega/Uno:-
At its core, both boards are single-board microcontrollers, meaning they integrate
all the essential components like a processor, memory, and input/output
(I/O) pins onto a single board. This allows users to easily connect various
electronic components like LEDs, sensors, and motors without complex circuitry.
Central Processing Unit (CPU):
● Arduino Uno: Uses an ATmega328P microcontroller, an 8-bit AVR
microcontroller with a clock speed of 16 MHz.
● ATmega328P microcontroller
● Arduino Mega: Utilizes an ATmega2560 microcontroller, a more powerful
8-bit AVR microcontroller with a clock speed of 16 MHz.
● ATmega2560 microcontroller
Memory:-
● Arduino Uno: Has 32 KB of flash memory for storing code, 2 KB of SRAM
for temporary data storage, and 1 KB of EEPROM for non-volatile data
storage.
● Arduino Mega: Boasts 256 KB of flash memory, 8 KB of SRAM, and 4 KB
of EEPROM, offering significantly more space for complex projects.
Input/Output (I/O) Pins:-
● Arduino Uno: Provides 14 digital I/O pins (of which 6 can be used as PWM
outputs) and 6 analog input pins.
● Arduino Mega: Offers a much larger set of I/O pins, with 54 digital I/O pins
(of which 15 can be used as PWM outputs) and 16 analog input pins.
Programming:-
Both boards are programmed using the Arduino Integrated Development
Environment (IDE), a free and open-source software that allows users to write,
compile, and upload code to the board. The code is written in a simplified C/C++-
like language that is beginner-friendly.
● Internal LED:
● External LED:
Interfacing code:-
int internalLedPin = 13; // Internal LED pin (may vary for different boards)
void setup() {
pinMode(internalLedPin, OUTPUT);
pinMode(externalLedPin, OUTPUT);
}
void loop() {
digitalWrite(internalLedPin, HIGH);
digitalWrite(externalLedPin, HIGH);
delay(1000);
digitalWrite(internalLedPin, LOW);
digitalWrite(externalLedPin, LOW);
delay(1000);