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

Arduino Uno

The Arduino Uno is a microcontroller board based on the ATmega328P microchip. It consists of both a physical programmable circuit board and Arduino IDE software. The board has 14 digital input/output pins that can be programmed to receive or output data. It also has pins for serial communication, external interrupts, PWM, an onboard LED, and power/reset functions. The Arduino is programmed using the Arduino IDE and can communicate with a computer or other devices via serial, I2C, and SPI protocols. Programs for the Arduino consist of setup and loop functions to initialize hardware and provide ongoing operation.

Uploaded by

Siva Virat
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)
327 views5 pages

Arduino Uno

The Arduino Uno is a microcontroller board based on the ATmega328P microchip. It consists of both a physical programmable circuit board and Arduino IDE software. The board has 14 digital input/output pins that can be programmed to receive or output data. It also has pins for serial communication, external interrupts, PWM, an onboard LED, and power/reset functions. The Arduino is programmed using the Arduino IDE and can communicate with a computer or other devices via serial, I2C, and SPI protocols. Programs for the Arduino consist of setup and loop functions to initialize hardware and provide ongoing operation.

Uploaded by

Siva Virat
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

ARDUINO UNO

Introduction

Arduino is an open-source microcontroller board that is based on


the microchip ATMEGA328P used for building electronic projects.Arduino consists
of both a physical programmable circuit board (often referred to as a microcontroller)
and a piece of software, or IDE (Integrated Development Environment) that runs on
your computer, used to write and upload computer code to the physical board. The
Arduino platform has become quite popular with people just starting out with
electronics, and for good reason. Unlike most previous programmable circuit boards,
the Arduino does not need a separate piece of hardware (called a programmer) in
order to load new code onto the board – you can simply use a USB cable.
Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program. Finally, Arduino provides a standard form factor that breaks out the
functions of the micro-controller into a more accessible package.

What’s on Board?
Arduino uno is a microcontroller board based on 8-bit ATmega328P microcontroller.
Along with that ,it consists other components such as crystal oscillator ,serial
communication ,voltage regulator ,etc ,to support the microcontroller.

How to use Arduino Board?

The 14 digital input/output pins can be used as input or output pins by using
pinMode(),digital Read() and digitalWrite() functions in arduino programming.Each
pin operate at 5v and can provide or receive a maximum of 40mA current, and has an
internal pull-up resistor of 20-50k ohms which are disconnected by default .Out of
these 14 pins,some have specific functions as listed below:

Serial Pins 0(RX) and 1(TX): Rx and Tx pins are used to receive and
transmit TTL serial data.They are connected with the corresponding ATmega328P
USB to TTL serial chip.

External Interrupt Pins 2 and 3: These pins can be configured to trigger an


interrupt on a low value, a rising or falling edge ,or a change in value.

PWM Pins 10(SS),11(MOSI),12(MISO) and 13(SCK): These pins are used


for SPI communication.

In-built LED Pin 13: This pin is connected with an built-in LED, when pin
13 is HIGH - LED is on, and when pin 13 is LOW ,its off.

AREF: Used to provide reference voltage for analog inputs with


analogReference() function.
Reset Pin: Making this pin LOW,resets the microcontroller.

Crystal oscillator:Crystal oscillator soldered on arduino development board


provide a clock signal to microcontroller ATmega328 .This provides a square wave
signal,which determine the time required for each T state.As in general arduino board
has 16Mhz frequency crystal hence takes 1/16 micro sec to run 1T state.

Voltage Regulator:The voltage regulator is not actually something you can (or
should) interact with on the Arduino. But it is potentially useful to know that it is
there and what it’s for. The voltage regulator does exactly what it says – it controls
the amount of voltage that is let into the Arduino board. Think of it as a kind of
gatekeeper; it will turn away an extra voltage that might harm the circuit. Of course, it
has its limits, so don’t hook up your Arduino to anything greater than 20 volts.

Communication

Arduino can be used to communicate with a computer,another Arduino board or


other microcontrollers. The ATmega328P microcontroller provides UART TTL (5V)
serial communication which can be done using digital pin 0 (RX) and digital pin 1
(TX). An ATmega32816U2 on the board channels this serial communication over
USB and appears as a virtual com port to software on the computer.The
ATmega16U2 firm uses the standard USB COM drivers ,and no external driver is
needed. However, on Arduino software includes a serial monitor which allows simple
textual data to be sent to and from the Arduino board.There are two RX and TX
LEDs on the arduino board which will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer. A SoftwareSerial library
allows for serial communication on any of the UNO’s digital pins.The ATmega328P
also supports I2C (TWI) and SPI communication.The Arduino software includes a
Wire library to simplify use of the I2C bus.

Arduino Software

Why Arduino Software?

Arduino IDE (Integrated Development Environment) is required to


program the Arduino Uno board.The open source Arduino Software (IDE) makes it
easy to write code and upload it to the board.It runs on Windows, Mac OS X, and
Linux. The environment is written in Java and based on processing and other open-
source software.

Arduino Programming

Programming is the process of writing a series of instructions that


eventually get turned into an executable format for the Arduino microcontroller.The
Arduino is programmed in the processing language,but is more similar to C/C++ .
The language is procedural,which is similar to following a series of mathematical
functions.Each function takes some data ,manipulates it, and returns something. An
example could be that a functoin called “Move(x)” would move the robot for the
given time “X” forward.

The language can be split into three major topics:


1. Variables(numbers that change over time in your application),
2. Loops (Repetitions that are needed for calculations or events), and
3. Functions(Blocks of code that can be repeated multiple times with varying inputs
and outputs).

Body of An Arduino Program

When using the Arduino , there are two functions that are absolutely needed, a
“void setup ()”, and a “void loop ()”. Setup is called only once at the beginning of the
program, and is used initialize variables and hardware needed for the main routine,
“loop”. Loop runs continuously until the power is cut, and is where you want to place
your logic.

A very simple program that gives an example of this by setting up the Arduino
and making the LED blink is shown below:

//the setup function runs once when you press reset or power the board
void setup() {
//initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUITIN, OUTPUT);
}

// the loop function runs over and over again forever


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

A sample program of arduino is shown in figure


Instructions Used in Programming

DigitalRead and DigitalWrite:DigitalRead and DigitalWrite are two


functions used in writing and reading values to pins on the Arduino. These two
functions find use in interaction with your hardware.

Looking at the above example program,the programmer uses DigitalWrite to


write a value of “HIGH” to the pin, sending voltage to it, and in turn lighting up the
LED. Then ,after “sleeping”,or pausing, one second, he sends a value of “LOW” to
the pin, sending little or no voltage to it, and turning off the LED.

You might also like