You are on page 1of 21

ARE YOU GUYS EXCITED ??

SHALL WE BEGIN ??
What do you remember when you hear the
word electronics ?
VOLTAGE

CURRENT
AMPS

ELECTRICITY
VOLTS

IONS CHARGES
ELECTRICITY
Electricity is the set of physical phenomena associated with the presence and motion
of matter that has a property of electric charge.

CURRENT (AMPS)
An electric current is a stream of charged particles, such as electrons or ions, moving
through an electrical conductor or space. It is measured as the net rate of flow of
electric charge through a surface or into a control volume.

VOLTAGE (VOLTS)
Voltage is the pressure from an electrical circuit's power source that pushes
charged electrons (current) through a conducting loop
EMBEDDED SYSTEM
An embedded system is a computer system, a combination of a computer
processor, computer memory, and input/output peripheral devices that has a
dedicated function within a larger mechanical or electronic system.
MICRO-CONTROLLER

It is a micro-computer. As any computer, it has


internal CPU, RAM, IOs interface.
It is used for control purposes, and for data
analysis

Famous micro-controller manufactures are


Microchip, Atmel, Analog devices and more.
What is Arduino ?
 A micro-controller board , contains on-board power supply , USB port to
communicate with PC, and an Atmel microcontroller chip.

 It simplify the process of creating any control system by providing the standard board
that can be programmed and connected to the system without the need of sophisticated
PCB design and implementation.

 It is an open source hardware, any one can get the details of its design and modify it or
make his own himself.
HISTORY OF ARDUINO

 The Arduino project was started at the Interaction Design Institute Ivrea (IDII)
in Ivrea, Italy.
 The Arduino project began in the year 2005.
 The main aim behind building this board to provide low cost
easily usable for beginners.
 The name Arduino comes from the bar in Italy, “Arduin”
Arduino boards :
Arduino Uno :
Digital or Analog ?

All physical quantities are analog.

* Analog means the quantity can take any value between its minimum
value and maximum value.
Ex: variation of amplitude in sine wave.

* Digital means that the quantity can take specific levels of values with
specific offset between each other
Ex: square waves , they are either high or low but do not have

intermediate value.
MAJOR COMPONENTS OF ARDUINO

 AL unit - This unit does arithmetic and logic operations

 Memory unit - stored the data, instructions, program, assignment of ports


(input/output).

 Input and Output ports - Once assigned they read or write through this
ports.

 Control unit – Generally like a CPU, where it handles all the operations.
FEATURES OF MICROPROCESSOR ATmega328

 ATmega328 is an 8-bit, 28-Pin AVR Microcontroller.


 It follows RISC Architecture and has a flash-type program memory of 32KB.
 It has an EEPROM memory of 1KB and its SRAM memory is 2KB.
 It has 8 Pins for ADC operations ( PA0 – PA7 ).
 It also has 3 built-in Timers, two of them are 8 Bit timers while the third
one is 16-Bit Timer.
Code structure :

Initialization section

Void setup ()
{
….. // use to indicate the initial values of system on starting
}

Void loop()
{
…..// contains the statements that will run whenever the system is powered
after setup.
}
Data Types and Operators
INTEGER : Used with integer variables with value between 2147483647
and -2147483647.
Ex: int x=1200;
CHARACTER : used with single character to represent all the characters
(a-z and A-Z).
Ex: char =‘r’;
LONG : long variables are extended size variable for number storage and
store 32 bits (4 bytes), Range Is from -2,17,483,648 to 2,17,483,647.
Ex: long u =199203;
FLOATING POINT : Number can be as large as 3.4028235E+38 and as low
as - 3.4028235E+38. They are sorted as 32
bits information (4 bytes)
Ex : float num=1.291;
CONTROL STATEMENTS
If conditioning
if (condition )
{
statement-1 ;
……
Statement –N;
}
Else if(condition2)
{
statements;
}
Else {statements;}
CONTROL STATEMENTS:
 Switch case :
switch(var)
{
Case1:
// do something when var equals 1
Break;
case2:
// do something when var equals 2
break;
default :
// if nothing else matches, do the
default
// default is optional
}
LOOP STATEMENTS :
DO WHILE :
do
{
statements;
}

WHILE :
while (condition)
{ statements;}

FOR

For (int i=0; i<=val; i++)


{
statements;
}
Few input and output functions

pinMode();
digitalRead();
digitalWrite();
analogRead();
analogWrite();
Delay();
Serial.Print();
Serial.Println();
HURRAY !! WE ARE DONE

You might also like