0% found this document useful (0 votes)
5 views

ARDUINO FOR IACT

The document provides an overview of Arduino, an open-source electronics platform that allows users to create interactive projects using various types of Arduino boards, particularly the Arduino Uno. It details the specifications, parts, and pin layout of the Arduino Uno, as well as the programming structure and language used for coding. Additionally, it includes links to resources for further learning and references for additional information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

ARDUINO FOR IACT

The document provides an overview of Arduino, an open-source electronics platform that allows users to create interactive projects using various types of Arduino boards, particularly the Arduino Uno. It details the specifications, parts, and pin layout of the Arduino Uno, as well as the programming structure and language used for coding. Additionally, it includes links to resources for further learning and references for additional information.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

21/04/2025

ARDUINO
FOR IACT
INSTRUCTOR:
MARK JAMES B. LAYSON,ECT

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. You can tell your
board what to do by sending a set of
instructions to the microcontroller on the
board. To do so you use the Arduino
programming language (based on Wiring), and
the Arduino Software (IDE), based on
Processing.

1
21/04/2025

TYPES OF ARDUINO
Arduino Mega (R3) Board
Arduino Uno (R3)
Arduino Leonardo Board
Arduino Nano
Arduino Robot
Arduino Micro
Arduino Esplora
Arduino Due
Arduino Pro Mic
LilyPad Arduino Board
Arduino Ethernet
Arduino Bluetooth
Arduino Zero
Arduino Diecimila
Fastest Arduino Board
RedBoard Arduino Board

ARDUINO UNO
Arduino UNO is a microcontroller board based on the ATmega328P. It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP
header and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with
a AC-to-DC adapter or battery to get started. You can tinker with your UNO without
worrying too much about doing something wrong, worst-case scenario you can
replace the chip for a few dollars and start over again.

2
21/04/2025

Microcontroller ATmega328P – 8 bit AVR


family microcontroller
Operating Voltage 5V
Recommended Input 7-12V
Voltage
Input Voltage Limits 6-20V
Arduino Uno Technical Analog Input Pins 6 (A0 – A5)

Specifications Digital I/O Pins 14 (Out of which 6


provide PWM output)
DC Current on I/O Pins 40 mA
DC Current on 3.3V Pin 50 mA
Flash Memory 32 KB (0.5 KB is used for
Bootloader)
SRAM 2 KB
EEPROM 1 KB
Frequency (Clock Speed) 16 MHz

ARDUINO UNO
Replaceable chip
The ATmega328P can easily
be replaced, as it is not
soldered to the board.
EEPROM
The ATmega328P also
features 1kb of EEPROM, a
memory which is not
erased when powered off.
Battery Connector
The Arduino UNO features a
barrel plug connector, that
works great with a standard
9V battery.

3
21/04/2025

PARTS OF AN ARDUINO UNO

PARTS OF AN ARDUINO UNO


USB connector

This is a printer USB port used to load a program from the Arduino IDE onto the Arduino board. The board can also be powered
through this port.

Power port:

The Arduino board can be powered through an AC-to-DC adapter or a battery. The power source can be connected by plugging in
a 2.1mm center-positive plug into the power jack of the board.

2.1mm center-positive plug:

The Arduino UNO board operates at a voltage of 5 volts, but it can withstand a maximum voltage of 20 volts. If the board is
supplied with a higher voltage, there is a voltage regulator (it sits between the power port and USB connector) that protects the
board from burning out.

4
21/04/2025

PARTS OF AN ARDUINO UNO


Microcontroller: Atmega328P

It is the most prominent black rectangular chip with 28 pins. Think of it as the brains of your Arduino. The microcontroller
used on the UNO board is Atmega328P by Atmel ( a major microcontroller manufacturer). Atmega328P has the following
components in it:

 Flash memory of 32KB. The program loaded from Arduino IDE is stored here. RAM of 2KB. This is a runtime memory.

 CPU: It controls everything that goes on within the device. It fetches the program instructions from flash memory and
runs them with the help of RAM.

 Electrically Erasable Programmable Read Only Memory (EEPROM) of 1KB. This is a type of nonvolatile memory, and it
keeps the data even after device restart and reset.

PARTS OF AN ARDUINO UNO


Analog input pins:

The Arduino UNO board has 6 analog input pins, labeled “Analog 0 to 5.” These pins can read the signal from an analog sensor
like a temperature sensor and convert it into a digital value so that thesystem understands. These pins just measure voltage and
not the current because they have very high internal resistance. Hence, only a small amount of current flows through these pins.
Although these pins are labeled analog and are analog input by default, these pins can also be used for digital input or output.

Digital pins:

You can find these pins labeled “Digital 0 to 13.” These pins can be used as either input or output pins. When used as output,
these pins act as a power supply source for the components connected to them. When used as input pins, theyread the signals
from the component connected to them. When digital pins are used as output pins, they supply 40 milliamps of current at 5 volts,
which is more than enough to light an LED. Some of the digital pins are labeled with tilde (~) symbol next to the pin numbers (pin
numbers 3, 5, 6, 9, 10, and 11). These pins act as normal digital pins but can also be used for Pulse-Width Modulation (PWM),
which simulates analog output like fading an LED in and out.

5
21/04/2025

PARTS OF AN ARDUINO UNO


Reset switch:

When this switch is clicked, it sends a logical pulse to the reset pin of the Microcontroller, and now runs the
program again from the start. This can be very useful if your code doesn’t repeat, but you want to test it multiple
times.

Crystal oscillator:

This is a quartz crystal oscillator which ticks 16 million times a second. On each tick, the microcontroller performs
one operation, for example, addition, subtraction, etc.

PARTS OF AN ARDUINO UNO


USB interface chip:

Think of this as a signal translator. It converts signals in the USB level to a level that an Arduino UNO board
understands.

TX – RX LEDs:

TX stands for transmit, and RX for receive. These are indicator LEDs which blink whenever the UNO board is
transmitting or receiving data.

6
21/04/2025

ARDUINO UNO
PIN LAYOUT

ARDUINO UNO PIN LAYOUT


Power Pins
Power pins are essential for operating the board and connected devices. The main pins include:

•VIN: Accepts external power sources (7-12V).

•5V and 3.3V: Provide regulated voltage outputs for peripherals.

•GND (Ground): Completes the circuit.

•IOREF: Supplies a voltage reference for I/O pins.


Tip: Always verify the voltage compatibility of connected components to avoid damage.

7
21/04/2025

ARDUINO UNO PIN LAYOUT


Digital Pins (0-13)
The Arduino UNO has 14 digital pins that can function as inputs or outputs.

•Pins 0 (RX) and 1 (TX): Reserved for serial communication.

•Pins 2-13: General-purpose I/O pins.

•PWM Pins (3, 5, 6, 9, 10, 11): Support Pulse Width Modulation, ideal for applications like
controlling motors and dimming LEDs.
Use functions like pinMode(), digitalWrite(), and digitalRead() to interact with these pins.

ARDUINO UNO PIN LAYOUT


Analog Pins (A0-A5)
Analog pins allow reading continuous voltage signals, often from sensors.

•Resolution: 10-bit (0 to 1023 range).

•Flexibility: Can also function as digital I/O pins when required.

Special Function Pins


•Reset Pin: Resets the board when triggered.

•AREF: Used to provide an external voltage reference for analog inputs.

•Serial Pins (RX/TX): Facilitate UART communication for serial data exchange.

8
21/04/2025

ARDUINO UNO PIN LAYOUT


ICSP Header
The ICSP (In-Circuit Serial Programming) header allows direct programming of the
microcontroller or connecting additional peripherals.

•MISO (Master-In-Slave-Out): Receives data from peripherals.

•MOSI (Master-Out-Slave-In): Sends data to peripherals.

•SCK (Serial Clock): Synchronizes data transfer.

ARDUINO UNO PIN LAYOUT


Communication Pins
•I2C Pins: SCL (Clock line) and SDA (Data line) are located on A5 and A4, respectively.

•SPI Pins: Share functionality with the ICSP header (MISO, MOSI, and SCK).

•UART Pins: TX (Pin 1) and RX (Pin 0) handle serial communication.

9
21/04/2025

ARDUINO SOFTWARE
The Arduino IDE (Integrated Development
Environment) is a software application
used to write, compile, and upload code to
Arduino boards. It provides a user-friendly
interface for programming microcontrollers
and controlling hardware connected to the
Arduino.
Download link:
https://www.arduino.cc/en/software/
Tutorial:
https://docs.arduino.cc/learn/starting-
guide/the-arduino-software-ide/

Programming Language

The programming language for Arduino is primarily


C++, specifically a simplified and extended version of
C++ known as the Arduino Language. This language
is used to interact with the Arduino board and its
peripherals, including reading inputs, controlling
outputs, and performing various computations.

10
21/04/2025

ARDUINO
PROGRAM
STRUCTURE

ARDUINO PROGRAM STRUCTURE


1. VARIABLE DECLARATION SECTION

Programs often begin with introductory comments that explain what the program is doing.
These comments come before the variable declarations. It is a good idea to begin every
program with comments like these so that when you return to your program later you’ll
know what it does.

Variables are usually declared at the beginning of a program immediately following the
introductory comments. All of the variables that you are using in your code should be
listed here, before the setup and loop sections.

11
21/04/2025

ARDUINO PROGRAM STRUCTURE


2. SETUP SECTION
The setup section, which runs once when the program begins, follows the variable
declaration section. Statements that lay the foundation for actions that happen later on in the
program are put in the setup section. In particular, pinMode statements are almost always in
this section. The section begins with the line void setup() {. Note that all statements in the
setup section are placed between an open curly bracket ‘{‘ right after void setup() and a
closed curly bracket ‘}’ at the end of the section.

These brackets tell the Arduino software when the setup section begins and ends. Without
them, the software is lost and unable to compile your code. Think of these curly brackets as
additional punctuation that your code requires. Your code must be perfectly punctuated to
compile.

ARDUINO PROGRAM STRUCTURE


3. LOOP SECTION

After the setup section runs, the loop section runs over and over until the LilyPad is
turned off or reprogrammed—hence the word loop. The statements that carry out the
main action of your program are in this section.

As with the setup section, statements in the loop section are placed between open and
closed curly brackets. These curly brackets tell the computer when the loop section
begins (with the opening curly bracket) and when it ends (with the closing curly bracket).

12
21/04/2025

SAMPLE CODE

REFERENCES
https://www.elprocus.com/different-types-of-arduino-boards/

https://www.hackerearth.com/blog/developers/a-tour-of-the-arduino-uno-board/

https://components101.com/microcontrollers/arduino-uno

https://docs.arduino.cc/learn/starting-guide/the-arduino-software-ide/

http://sewelectric.org/diy-projects/3-programming-your-lilypad/arduino-program-structure/

13

You might also like