Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ep-1.1 21mca2001

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Worksheet Number 1.

• Aim/Overview of the practical:

Design first sketch to interface Led with Arduino Uno and to design different
patterns.

• Hardware Required:

• LED Lights
• Resistor
• Arduino UNO3
• Breadboard

• Theory:

Arduino Uno is a microcontroller board that allows you to build electronics


projects by connecting sensors and other components to it. It is easy to use
and comes with a programming environment that simplifies the process of
writing code. It is used in a variety of applications, including robotics, home
automation, and many other projects.

A breadboard is a prototyping board used to build and test electronic circuits.


It has a grid of holes into which electronic components, such as resistors,
capacitors, and integrated circuits, can be inserted and connected without the
need for soldering. The holes are typically arranged in a series of parallel
rows and columns, allowing for easy circuit design and modification.
Breadboards come in various sizes and can be reused multiple times for
different projects. They are widely used by hobbyists, students, and
professionals for electronics prototyping and testing.
Implementation:
Here are the steps to create a blinking LED circuit using an Arduino
Uno and breadboard:
• Gather your materials: You will need an Arduino Uno, a breadboard,
an LED, a 220-ohm resistor, and some jumper wires.
• Connect the Arduino Uno to the breadboard: Insert the Arduino Uno
onto the breadboard so that the pins on the bottom of the board are
connected to the power rails on the breadboard.
• Connect the LED and resistor: Insert the LED and 220-ohm resistor
into the breadboard. Connect the positive leg of the LED to a hole in
the same row as the resistor, and the negative leg of the LED to a
different row on the breadboard.
• Connect the Arduino Uno to the LED and resistor: Connect one end of
the resistor to a digital pin on the Arduino Uno, and the other end of the
resistor to the negative leg of the LED.
• Write the code: Open the Arduino IDE and write a code that will make
the LED blink. Code is shown below at point 4.
• Upload the code: Connect the Arduino Uno to your computer using a
USB cable and upload the code to the board.
• Test the circuit: Once the code is uploaded, the LED should start
blinking. If it doesn't, check your wiring and code to ensure everything
is correct.

• Arduino Code:

void setup()
{
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(4, OUTPUT);
}
void blinkit(int led){ //Function for LED blinking
digitalWrite(led, HIGH);
delay(100);
digitalWrite(led, LOW);
}

void loop()
{
blinkit(13);
blinkit(12);
blinkit(8);
blinkit(7);
blinkit(4);
}

• Output (Screenshots from Tinker Cad):

Gif Format from Tinker Cad

• Learning outcomes (What I have learnt):


1. Basic Learning and Implementation Tinker Cad
2. Functioning of Arduino Uno
3.Usage of Breadboard, LED and Resistors
4.Coading and Creating a Blinking LED

You might also like