Arduino 1
Arduino 1
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 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 ?
* 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
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
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
pinMode();
digitalRead();
digitalWrite();
analogRead();
analogWrite();
Delay();
Serial.Print();
Serial.Println();
HURRAY !! WE ARE DONE