5/20/2019
Arduino
5/20/2019
1.Introduction
5/20/2019
What is Micro Controller?
• A microcontroller is a small computer on a
single integrated circuit
• It has internal CPU, RAM and I/O
1.Introduction
5/20/2019
What is Arduino Board?
• A microcontroller board, contains on
board power supply, USB port
communicate with PC and has memory
etc.
1.Introduction
5/20/2019
Arduino Boards
1.Introduction
5/20/2019
Arduino Uno Structure
2. Coding
5/20/2019
Data Types & Operators
• Integer
• Char
• Float
• long
Ex:-
int a = 10;
char character = ‘A’;
2. Coding
5/20/2019
Statements & Operators
• Math Operators
[+, -, *, /, %, ^]
• Logic Operators
[==, !=, &&, ||]
• Comparison Operators
[==, !=, >, <, >=, <=]
2. Coding
5/20/2019
Control Statements
• If Statement
if (condition1) {
// block of code to be executed if condition1 is true
} else if (condition2) {
// block of code to be executed if the condition1 is false and
condition2 is true
} else {
// block of code to be executed if the condition1 is false and
condition2 is false
}
2. Coding
5/20/2019
Control Statements
• Switch Case
switch(expression) {
case x:
// code block
break;
case y:
// code block
break;
default:
// code block
}
2. Coding
5/20/2019
Loop Statements
1. For loop
for (statement 1; statement 2; statement 3) {
// code block to be executed
}
2. While
while (condition) {
// code block to be executed
}
3. Do while
do {
// code block to be executed
}
while (condition);
2. Coding
5/20/2019
Code Structure
Void setup(){
Used to indicate the initial values of the
system on starting
}
Void loop(){
contain the statements that will run
whenever the system is powered after setup
}
2. Coding
5/20/2019
First Program
LED Blink
2. Coding
5/20/2019
First Program
LED Blink
int led = 13;
void setup(){
pinMode(led, OUTPUT);
}
void loop(){
digitalWrite(led, HIGH);
delay(500);
digitalWrite(led, LOW);
delay(500);
}

Arduino Basic Presentation for Beginers