0% found this document useful (0 votes)
69 views5 pages

LAB #13 Objective:: Theory

The document discusses using an Arduino board for a microprocessor lab. It explains that Arduino is an open-source electronics platform that can read inputs and turn them into outputs. The Arduino Uno board has 20 digital pins that can be used for input/output or PWM, an ATmega328 microcontroller, and can be programmed using the Arduino IDE. An example circuit is provided to read the value of a potentiometer connected to analog pin A0 and print it to the serial monitor.

Uploaded by

Rasheed Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views5 pages

LAB #13 Objective:: Theory

The document discusses using an Arduino board for a microprocessor lab. It explains that Arduino is an open-source electronics platform that can read inputs and turn them into outputs. The Arduino Uno board has 20 digital pins that can be used for input/output or PWM, an ATmega328 microcontroller, and can be programmed using the Arduino IDE. An example circuit is provided to read the value of a potentiometer connected to analog pin A0 and print it to the serial monitor.

Uploaded by

Rasheed Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Page#1

Microprocessor lab#13

LAB #13
Objective:
To study and understand how to use
 Arduino board by both implementing and
 programming.

Theory:
Arduino:
Arduino is an open-source electronics platform based on easy-to-use hardware and
software. Arduino boards are able to read inputs - light on a sensor, a finger on a
button, or a Twitter message - and turn it into an output - activating a motor, turning
on an LED, publishing something online.
In fact, you already are; the Arduino language is merely a set of C/C++ functions
that can be called from your code. Your sketch undergoes minor changes (e.g.
automatic generation of function prototypes) and then is passed directly to a C/C++
compiler (avr-g++).

The Uno is one of the more popular boards in the


Arduino family and a great choice for beginners.
We’ll talk about what’s on it and what it can do later
in the tutorial. The Arduino Uno is a microcontroller
board based on the ATmega328. It has 20 digital
input/output pins (of which 6 can be used as PWM
outputs and 6 can beused as analog inputs), a 16 MHz resonator, a USB
connection, a power jack, an in-circuit system programming (ICSP) header, and a
reset button.

Muhammad Abdullah Zubair 2k16-ele-142 Microprocessor lab manual#13


Page#2
Microprocessor lab#13

This is a screenshot of the Arduino IDE.

Those 10 lines of code are all you need to blink the on-board LED on your
Arduino.
How to download/install Arduino:
 Open google browser
 Type extratorrent.cc
 Now open the site of www.extratorrent .cc
 Now go to search box and type Arduino IDE
 Now click on search
 Now download the ide file from given link
 Drivers will be automatically install from this site
 Then open it and install
Steps to upload the program:
 First of all, open the ide software
 Now write the required program on given space
 After the program is complete verify the program to debug errors
 After that connect the Arduino board

Muhammad Abdullah Zubair 2k16-ele-142 Microprocessor lab manual#13


Page#3
Microprocessor lab#13

 Go to tool then go to board option and choose the desired board you are
using
 Now again go to tool and go to port and select port that your board is
connected to
 Now click on the upload button
 And it’s ready to connect to the circuit
Example # 01
Potentiometer serial monitor and plotter
Components:

 Arduino Uno
 10K Potentiometer
 Wires

How to connect:

 Attach the center pin of a potentiometer to


Analog 0 (A0)
 And the outside pins to +5V and ground
(GND)

Program:
void setup () {

Serial.begin(9600);

void loop () {

int sensor Value = analog Read(A0);

Muhammad Abdullah Zubair 2k16-ele-142 Microprocessor lab manual#13


Page#4
Microprocessor lab#13

Serial.println(sensor Value);

delay (1000);

Muhammad Abdullah Zubair 2k16-ele-142 Microprocessor lab manual#13


Page#5
Microprocessor lab#13

Conclusion:
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------

Muhammad Abdullah Zubair 2k16-ele-142 Microprocessor lab manual#13

You might also like