4. Electricity is the set of physical phenomena associated with the presence and motion
of matter that has a property of electric charge.
ELECTRICITY
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 is the pressure from an electrical circuit's power source that pushes
charged electrons (current) through a conducting loop
VOLTAGE (VOLTS)
5. 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.
6. 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.
7. 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.
8. 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”
11. 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.
12.
13. 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.
14. 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.
15. 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.
}
16. 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;
18. 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
}
19. LOOP STATEMENTS :
DO WHILE :
do
{
statements;
}
WHILE :
while (condition)
{ statements;}
FOR
For (int i=0; i<=val; i++)
{
statements;
}
20. Few input and output functions
pinMode();
digitalRead();
digitalWrite();
analogRead();
analogWrite();
Delay();
Serial.Print();
Serial.Println();