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

Session 1 Arduino

Uploaded by

anasmostafa801
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Session 1 Arduino

Uploaded by

anasmostafa801
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Prepared by:

Esraa taha ali


Examples of embedded systems
An embedded system is a combination of computer hardware and
software designed for a specific function.
Embedded systems may also function within a larger system.
The systems can be programmable or have a fixed functionality.

EMBEDDED SYSTEM
Arduino Board
Arduino Board “Strong Friend” Created in Ivrea, Italy in 2005 by
Massimo Banzi & David Cuartielles &Tom Igole &David Mellis
& Gianluca Martino.
it’s an Open Source Hardware.
Projects with arduino
Introduction
Not long ago, working on an electronic circuit to perform a •
specific function meant building a complex electronic design
consist of resistors, capacitors, and coils

The circuits were fixed in design and re-change a part of it •


required complex operations such as soldering and wire cutting

The development in the field of semiconductors has led to the •


emergence of integrated circuits, which are integrated circuits
on field of semiconductors has led to the emergence of
integrated circuits, which are integrated circuits on small chips
The development of integrated circuits led to the emergence of
the so-called microcontrollers
integrated circuits
The development in the field of semiconductors has led to the
emergence of integrated circuits, which are called IC.
It become possible to put an integrated electronic circuit on a very small chip.
The development of integrated circuits led to the emergence of
microcontrollers.
Microcontroller
Microcontroller is like a small computer that can be •
programmed To perform certain operations Such as
controlling an electric motor, reading the temperature, and
all of operations is done by writing software commands that
can be changed and modified while keeping the electronic
design fixed.
Arduino
Arduino is an open-source platform used for building electronics
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.
Arduino platform
The Arduino plat form has become quite popular with people
just starting out with electronics, and for good reason. 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.
Different Types Of Arduino Boards

Arduino Uno (R3) •


Arduino Nano •
Arduino Mega •
Arduino Due • Arduino Uno Arduino Nano
Arduino Micro •

Arduino Mega Arduino Due


Arduino UNO
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.
Operating voltage
The board can operate on an external supply from 6
to 20 volts.
If supplied with less than 7V, however, the 5V pin
may supply less than five volts and the board may
become unstable.
If using more than 12V, the voltage regulator may
overheat and damage the board. The recommended
range is 7 to 12 volts.
How to supplied Arduino
There are three ways to power your Arduino: •
1- you can use the USB connector to connect to a computer •
2-or portable power pack you can plug into a wall adapter.
3-or powered it using battery connected to vin pin
USB can be used to power and program. DC can only be •
used for power

Adaptor battery Usb cable


Arduino IDE
The open-source Arduino Software (IDE) •
makes it easy to write code and upload it to
the board. This software can be used with
any Arduino board.
Arduino Architecture
Simplified Architecture
Micro processor RAM

Data
Central memory
processing
unit ( Volatile
memory)

ROM

Program
memory
(Non volatile
memory)
Definition of variable
A variable is a name given to a storage area that our programs
can manipulate.
Each variable in C has a specific type, which determines the
size and layout of the variable's memory.
the range of values that can be stored within that memory and
the set of operations that can be applied to the variable.

Variable

RAM
Variable naming conditions
The name of a variable can be composed of •
letters, digits, and the underscore character. It
must begin with either a letter or an underscore.
Upper and lowercase letters are distinct because
C is case-sensitive
Memory
The memory consist of some locations each •
location called byte. •
byte consist of 8 bit each bit can be zero or one •
bit
byte

ROM RAM
basic variable types(data types)
1-bool (1bit) - simple logical true/false
2-byte (8 bit) - unsigned number from 0-255 •
3-char (8 bit) - signed number from -128 to 127 •
4-unsigned char (8 bit) - same as 'byte’.
5-word (16 bit) - unsigned number from 0-65535 •
6-unsigned int (16 bit)- the same as 'word'. Use 'word' instead for clarity and brevity •
7-int (16 bit) - signed number from -32768 to 32767.
8-unsigned long (32 bit) - unsigned number from 0-4,294,967,295. •
9- long (32bit) - signed number from -2,147,483,648 to 2,147,483,647 •
10-float (32 bit) - signed number from -3.4028235E38 to3.4028235E38.
Bread board
A breadboard is a rectangular plastic board with a bunch of tiny
holes in it.
These holes let you easily insert electronic components to
prototype.
Explain the breadboard
inside of the breadboard is made up of sets of five metal clips. This
means that each set of five holes forming a half column- (columns A–E
or columns F–J) is electrically connected.
For example, that means hole A1 is electrically connected to holes B1,
C1, D1, and E1. It is not connected to hole A2, because that hole is in
a different row, with a separate set of metal clips. It is also not
connected to holes F1, G1, H1, I1, or J1, because they are on the
other "half" of the breadboard—the clips are not connected across the
gap in the middle.
The LED (light emitting diode)

The LED has two electrodes a positive electrode and a


negative one. It lights up only when a forward current passes,
and it can flash red, blue, green, yellow, etc. The colour of the
light depends on the material it is made.
In general, the drive current for LED is 5-20mA. Therefore, in
reality it usually needs an extra resistor for current limitation so
as to protect the LED
First project

the first project is to turn on led for one


second and and turn off it for one
second.
blinking led
blinking led

Arduino code

int ledPin=8; //definition digital 8 pins as pin to control the LED


void setup()
{
pinMode(ledPin,OUTPUT); //Set the digital 8 port mode, OUTPUT: Output mode
}
void loop()
{
digitalWrite(ledPin,HIGH); //HIGH is set to about 5V PIN8
delay(1000); //Set the delay time, 1000 = 1S
digitalWrite(ledPin,LOW); //LOW is set to about 5V PIN8
delay(1000); //Set the delay time, 1000 = 1S
}

You might also like