SlideShare una empresa de Scribd logo
1 de 75
Descargar para leer sin conexión
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Digital Signal
Processors
General-purpose
Microprocessors
Microcontrollers
Microprocessors
8086, Pentium
I-IV, Core-duo,
Atom, Sparc,..
8051, PIC,
ATMEGA, AVR,..
TMS320XX
AD21XX,…
Type of Microprocessors
Arduino introduction
Arduino introduction
WHAT IS ARDUINO?
Why invented the Arduino boards ?
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino shield
GSM shield Arduino
GPS shield Arduino
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Arduino introduction
Programming
Arduino introduction
Arduino introduction
Sketches
Arduino introduction
?
?
? ?
? ?
?
?
?
?
Arduino introduction
Arduino introduction
Important notes
{ } curly braces
Curly braces (also referred to as just "braces" or
"curly brackets") define the beginning and end of
function blocks and statement blocks such as
the void loop() function and the for and if
statements.
Void Loop()
{
Statements;
}
; semicolon
A semicolon must be used to end a statement and
separate elements of the program. A semicolon is also
used to separate elements in a for loop.
int x = 13; // declares variable 'x' as the integer 13
/*… */ block comments
Block comments, or multi-line comments, are areas of
text ignored by the program and are used for large text
descriptions of code or comments that help others
understand parts of the program. They begin with /*
and end with */ and can span multiple lines.
/* this is an enclosed block comment
don’t forget the closing comment -
they have to be balanced!
/*
// line comments
Single line comments begin with // and end with the next
line of code. Like block comments, they are ignored by
the program and take no memory
space.
// this is a single line comment
Single line comments are often used after a valid statement
to provide more information about what the statement
accomplishes or to provide a future reminder.
Arduino introduction
boolean (0, 1, false,
true)
char (e.g. ‘a’ -128 to 127) unsigned char (0 to 255)
byte (0 to 255) int (-32,768 to 32,767)
unsigned int (0 to
65535)
word (0 to 65535)
long (-2,147,483,648 to
2,147,483,648
unsigned long (0 to
4,294,967,295)
float
(-3.4028235E+38 to
3.4028235E+38)
double (currently same
as float)
sizeof(myint) // returns 2
bytes
Arduino introduction
General Operators
= (assignment operator)
+ (addition)
- (subtraction)
(multiplication) *
/ (division)
% (modulo)
== (equal to) != (not equal to)
< (less than) > (greater than)
<= (less than or equal to)
>= (greater than or equal to)
&& (and) || (or) ! (not)
x ++ // same as x = x + 1, or increments x by +1
x -- // same as x = x - 1, or decrements x by -1
x += y // same as x = x + y, or increments x by +y
x -= y // same as x = x - y, or decrements x by -y
x *= y // same as x = x * y, or multiplies x by y
x /= y // same as x = x / y, or divides x by y
Arduino introduction
Arduino introduction
Arduino introduction
Lecture 2
Arduino introduction
Arduino introduction
Important notes
{ } curly braces
Define the beginning and end of function blocks and
statement blocks such as the void loop() function
and the for and if statements.
Void Loop()
{
Statement;
Statement;
}
; semicolon
A semicolon must be used to end a statement and
separate elements of the program. A semicolon is also
used to separate elements in a for loop.
int x = 13; // declares variable 'x' as the integer 13
/*… */ block comments
Block comments, or multi-line comments, are areas of
text ignored by the program and are used for large text
descriptions of code or comments that help others
understand parts of the program. They begin with /*
and end with */ and can span multiple lines.
/* this is an enclosed block comment
don’t forget the closing comment -
they have to be balanced!
/*
// line comments
Single line comments begin with // and end with the next
line of code. Like block comments, they are ignored by
the program and take no memory
space.
// this is a single line comment
Single line comments are often used after a valid statement
to provide more information about what the statement
accomplishes or to provide a future reminder.
Arduino introduction
boolean (0, 1, false,
true)
char (e.g. ‘a’ -128 to 127) unsigned char (0 to 255)
byte (0 to 255) int (-32,768 to 32,767)
unsigned int (0 to
65535)
word (0 to 65535)
long (-2,147,483,648 to
2,147,483,648
unsigned long (0 to
4,294,967,295)
float
(-3.4028235E+38 to
3.4028235E+38)
double (currently same
as float)
sizeof(myint) // returns 2
bytes
General Operators
= (assignment operator)
+ (addition)
- (subtraction)
(multiplication) *
/ (division)
% (modulo)
== (equal to) != (not equal to)
< (less than) > (greater than)
<= (less than or equal to)
>= (greater than or equal to)
&& (and) || (or) ! (not)
Code Structures
Arduino introduction
Control statements
• If statement
• Switch case statement
• While statement
• Do …. While statement
• For statement
• If statement
• Switch case statement
• While statement
• Do …. While statement
• For statement
If statement
One way selection
Example
If (score >= 60)
grade = ‘P’ ;
else
grade = ‘F’ ;
Example
Two way selection
Multiple selections
Example
Important notes
{ } curly braces
Define the beginning and end of function blocks and
statement blocks such as the void loop() function
and the for and if statements.
Void Loop()
{
Statement;
Statement;
}
Compound statement
(block of statements):
if (age > 18)
{
cout << "Eligible to vote." << endl;
cout << "No longer a minor." << endl;
}
else
{
cout << "Not eligible to vote." << endl;
cout << "Still a minor." << endl;
}
Example
Switch case statement
switch structure
Example
• If statement
• Switch case statement
• While statement
• Do …. While statement
• For statement
Example
• while Looping (Repetition)
• do…while Looping (Repetition) Structure (continued)
Example
Arduino introduction
For statement
Infinite loop using while and for
for (;;)
cout << "Hello" << endl;
While(1)
{cout << "Hello" << endl;}
Arduino introduction
Arduino introduction

Más contenido relacionado

La actualidad más candente

FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONvikram mahendra
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control StructureSokngim Sa
 
Ch3 Formatted Input/Output
Ch3 Formatted Input/OutputCh3 Formatted Input/Output
Ch3 Formatted Input/OutputSzeChingChen
 
OXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IOXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IAbdul Rahman Sherzad
 
COM1407: Program Control Structures – Decision Making & Branching
COM1407: Program Control Structures – Decision Making & BranchingCOM1407: Program Control Structures – Decision Making & Branching
COM1407: Program Control Structures – Decision Making & BranchingHemantha Kulathilake
 

La actualidad más candente (12)

Chapter 1 nested control structures
Chapter 1 nested control structuresChapter 1 nested control structures
Chapter 1 nested control structures
 
C programming part4
C programming part4C programming part4
C programming part4
 
Ch3 selection
Ch3 selectionCh3 selection
Ch3 selection
 
Assignment
AssignmentAssignment
Assignment
 
FLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHONFLOW OF CONTROL-INTRO PYTHON
FLOW OF CONTROL-INTRO PYTHON
 
Cg
CgCg
Cg
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
 
Ch3 Formatted Input/Output
Ch3 Formatted Input/OutputCh3 Formatted Input/Output
Ch3 Formatted Input/Output
 
line clipping
line clipping line clipping
line clipping
 
C programming session8
C programming  session8C programming  session8
C programming session8
 
OXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IOXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART I
 
COM1407: Program Control Structures – Decision Making & Branching
COM1407: Program Control Structures – Decision Making & BranchingCOM1407: Program Control Structures – Decision Making & Branching
COM1407: Program Control Structures – Decision Making & Branching
 

Destacado

communication system Introduction - AM
communication system Introduction - AMcommunication system Introduction - AM
communication system Introduction - AMAbdelrahman Elewah
 
Chapter 2 Probabilty And Distribution
Chapter 2 Probabilty And DistributionChapter 2 Probabilty And Distribution
Chapter 2 Probabilty And Distributionghalan
 
Machine Learning Preliminaries and Math Refresher
Machine Learning Preliminaries and Math RefresherMachine Learning Preliminaries and Math Refresher
Machine Learning Preliminaries and Math Refresherbutest
 
OpenPump: open-source hardware for medical devices
OpenPump: open-source hardware  for medical devicesOpenPump: open-source hardware  for medical devices
OpenPump: open-source hardware for medical devicesSwansea University
 
Droidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsDroidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsBenjamin Zores
 
Доклад Амро
Доклад АмроДоклад Амро
Доклад АмроAmr Al-Awamry
 
Microwave Devices Lecture04
Microwave Devices Lecture04Microwave Devices Lecture04
Microwave Devices Lecture04Amr Al-Awamry
 
Microwave Devices Lecture06
Microwave Devices Lecture06Microwave Devices Lecture06
Microwave Devices Lecture06Amr Al-Awamry
 
Probability And Stats Intro
Probability And Stats IntroProbability And Stats Intro
Probability And Stats Intromailund
 
Microwave Devices Lecture08
Microwave Devices Lecture08Microwave Devices Lecture08
Microwave Devices Lecture08Amr Al-Awamry
 
Microwave Devices Lecture09
Microwave Devices Lecture09Microwave Devices Lecture09
Microwave Devices Lecture09Amr Al-Awamry
 
Microwave Devices Lecture13
Microwave Devices Lecture13Microwave Devices Lecture13
Microwave Devices Lecture13Amr Al-Awamry
 
Microwave Devices Lecture03
Microwave Devices Lecture03Microwave Devices Lecture03
Microwave Devices Lecture03Amr Al-Awamry
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Ramadan Ramadan
 
Microwave engineering ch1
Microwave engineering ch1Microwave engineering ch1
Microwave engineering ch1Muhammad Azwir
 
Microwave Devices Lecture12
Microwave Devices Lecture12Microwave Devices Lecture12
Microwave Devices Lecture12Amr Al-Awamry
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programmingMohamed Ali
 

Destacado (20)

communication system Introduction - AM
communication system Introduction - AMcommunication system Introduction - AM
communication system Introduction - AM
 
Chapter 2 Probabilty And Distribution
Chapter 2 Probabilty And DistributionChapter 2 Probabilty And Distribution
Chapter 2 Probabilty And Distribution
 
Machine Learning Preliminaries and Math Refresher
Machine Learning Preliminaries and Math RefresherMachine Learning Preliminaries and Math Refresher
Machine Learning Preliminaries and Math Refresher
 
OpenPump: open-source hardware for medical devices
OpenPump: open-source hardware  for medical devicesOpenPump: open-source hardware  for medical devices
OpenPump: open-source hardware for medical devices
 
Droidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsDroidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded Systems
 
Доклад Амро
Доклад АмроДоклад Амро
Доклад Амро
 
Microwave Devices Lecture04
Microwave Devices Lecture04Microwave Devices Lecture04
Microwave Devices Lecture04
 
Microwave Devices Lecture06
Microwave Devices Lecture06Microwave Devices Lecture06
Microwave Devices Lecture06
 
Probability And Stats Intro
Probability And Stats IntroProbability And Stats Intro
Probability And Stats Intro
 
Microwave Devices Lecture08
Microwave Devices Lecture08Microwave Devices Lecture08
Microwave Devices Lecture08
 
Microwave Devices Lecture09
Microwave Devices Lecture09Microwave Devices Lecture09
Microwave Devices Lecture09
 
Microwave Devices Lecture13
Microwave Devices Lecture13Microwave Devices Lecture13
Microwave Devices Lecture13
 
Microwave Devices Lecture03
Microwave Devices Lecture03Microwave Devices Lecture03
Microwave Devices Lecture03
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
 
Microwave engineering ch1
Microwave engineering ch1Microwave engineering ch1
Microwave engineering ch1
 
Filter design1
Filter design1Filter design1
Filter design1
 
8 habits
8 habits8 habits
8 habits
 
8086
80868086
8086
 
Microwave Devices Lecture12
Microwave Devices Lecture12Microwave Devices Lecture12
Microwave Devices Lecture12
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programming
 

Similar a Arduino introduction

Introduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoIntroduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoMark John Lado, MIT
 
CSL101_Ch1.pptx
CSL101_Ch1.pptxCSL101_Ch1.pptx
CSL101_Ch1.pptxshivanka2
 
[Apostila] programação arduíno brian w. evans
[Apostila] programação arduíno   brian w. evans[Apostila] programação arduíno   brian w. evans
[Apostila] programação arduíno brian w. evansWeb-Desegner
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5PRADEEP
 
0.my book draft chap 1
0.my book draft chap 10.my book draft chap 1
0.my book draft chap 1manhduc1811
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation finalAnkur Gupta
 
a basic java programming and data type.ppt
a basic java programming and data type.ppta basic java programming and data type.ppt
a basic java programming and data type.pptGevitaChinnaiah
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16John Todora
 
control statements
control statementscontrol statements
control statementsAzeem Sultan
 
Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COdinganna university
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...Khushboo Jain
 

Similar a Arduino introduction (20)

Introduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John LadoIntroduction to C Language - Version 1.0 by Mark John Lado
Introduction to C Language - Version 1.0 by Mark John Lado
 
CSL101_Ch1.ppt
CSL101_Ch1.pptCSL101_Ch1.ppt
CSL101_Ch1.ppt
 
CSL101_Ch1.ppt
CSL101_Ch1.pptCSL101_Ch1.ppt
CSL101_Ch1.ppt
 
CSL101_Ch1.pptx
CSL101_Ch1.pptxCSL101_Ch1.pptx
CSL101_Ch1.pptx
 
CSL101_Ch1.pptx
CSL101_Ch1.pptxCSL101_Ch1.pptx
CSL101_Ch1.pptx
 
[Apostila] programação arduíno brian w. evans
[Apostila] programação arduíno   brian w. evans[Apostila] programação arduíno   brian w. evans
[Apostila] programação arduíno brian w. evans
 
EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5EMBEDDED SYSTEMS 4&5
EMBEDDED SYSTEMS 4&5
 
0.my book draft chap 1
0.my book draft chap 10.my book draft chap 1
0.my book draft chap 1
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
 
a basic java programming and data type.ppt
a basic java programming and data type.ppta basic java programming and data type.ppt
a basic java programming and data type.ppt
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16
 
control statements
control statementscontrol statements
control statements
 
Basic Coding In VHDL COding
Basic Coding In VHDL COdingBasic Coding In VHDL COding
Basic Coding In VHDL COding
 
Interesting facts on c
Interesting facts on cInteresting facts on c
Interesting facts on c
 
c_tutorial_2.ppt
c_tutorial_2.pptc_tutorial_2.ppt
c_tutorial_2.ppt
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 

Último

CSR Managerial Round Questions and answers.pptx
CSR Managerial Round Questions and answers.pptxCSR Managerial Round Questions and answers.pptx
CSR Managerial Round Questions and answers.pptxssusera0771e
 
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdfSummer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdfNaveenVerma126
 
Modelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsModelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsYusuf Yıldız
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxUNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxrealme6igamerr
 
IT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptxIT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptxSAJITHABANUS
 
A Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationA Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationMohsinKhanA
 
Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...
Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...
Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...amrabdallah9
 
me3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part Ame3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part Akarthi keyan
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxjasonsedano2
 
News web APP using NEWS API for web platform to enhancing user experience
News web APP using NEWS API for web platform to enhancing user experienceNews web APP using NEWS API for web platform to enhancing user experience
News web APP using NEWS API for web platform to enhancing user experienceAkashJha84
 
Design Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptxDesign Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptxrajesshs31r
 
solar wireless electric vechicle charging system
solar wireless electric vechicle charging systemsolar wireless electric vechicle charging system
solar wireless electric vechicle charging systemgokuldongala
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docxSUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docxNaveenVerma126
 
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdfRenewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdfodunowoeminence2019
 
GENERAL CONDITIONS FOR CONTRACTS OF CIVIL ENGINEERING WORKS
GENERAL CONDITIONS  FOR  CONTRACTS OF CIVIL ENGINEERING WORKS GENERAL CONDITIONS  FOR  CONTRACTS OF CIVIL ENGINEERING WORKS
GENERAL CONDITIONS FOR CONTRACTS OF CIVIL ENGINEERING WORKS Bahzad5
 

Último (20)

Présentation IIRB 2024 Chloe Dufrane.pdf
Présentation IIRB 2024 Chloe Dufrane.pdfPrésentation IIRB 2024 Chloe Dufrane.pdf
Présentation IIRB 2024 Chloe Dufrane.pdf
 
Lecture 2 .pdf
Lecture 2                           .pdfLecture 2                           .pdf
Lecture 2 .pdf
 
CSR Managerial Round Questions and answers.pptx
CSR Managerial Round Questions and answers.pptxCSR Managerial Round Questions and answers.pptx
CSR Managerial Round Questions and answers.pptx
 
Lecture 2 .pptx
Lecture 2                            .pptxLecture 2                            .pptx
Lecture 2 .pptx
 
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdfSummer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
 
Modelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsModelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovations
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxUNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
 
IT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptxIT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptx
 
A Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationA Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software Simulation
 
Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...
Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...
Strategies of Urban Morphologyfor Improving Outdoor Thermal Comfort and Susta...
 
me3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part Ame3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part A
 
Présentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdfPrésentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdf
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptx
 
News web APP using NEWS API for web platform to enhancing user experience
News web APP using NEWS API for web platform to enhancing user experienceNews web APP using NEWS API for web platform to enhancing user experience
News web APP using NEWS API for web platform to enhancing user experience
 
Design Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptxDesign Analysis of Alogorithm 1 ppt 2024.pptx
Design Analysis of Alogorithm 1 ppt 2024.pptx
 
solar wireless electric vechicle charging system
solar wireless electric vechicle charging systemsolar wireless electric vechicle charging system
solar wireless electric vechicle charging system
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docxSUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
SUMMER TRAINING REPORT ON BUILDING CONSTRUCTION.docx
 
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdfRenewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
 
GENERAL CONDITIONS FOR CONTRACTS OF CIVIL ENGINEERING WORKS
GENERAL CONDITIONS  FOR  CONTRACTS OF CIVIL ENGINEERING WORKS GENERAL CONDITIONS  FOR  CONTRACTS OF CIVIL ENGINEERING WORKS
GENERAL CONDITIONS FOR CONTRACTS OF CIVIL ENGINEERING WORKS
 

Arduino introduction

  • 7. Digital Signal Processors General-purpose Microprocessors Microcontrollers Microprocessors 8086, Pentium I-IV, Core-duo, Atom, Sparc,.. 8051, PIC, ATMEGA, AVR,.. TMS320XX AD21XX,… Type of Microprocessors
  • 11. Why invented the Arduino boards ?
  • 41. Important notes { } curly braces Curly braces (also referred to as just "braces" or "curly brackets") define the beginning and end of function blocks and statement blocks such as the void loop() function and the for and if statements. Void Loop() { Statements; }
  • 42. ; semicolon A semicolon must be used to end a statement and separate elements of the program. A semicolon is also used to separate elements in a for loop. int x = 13; // declares variable 'x' as the integer 13 /*… */ block comments Block comments, or multi-line comments, are areas of text ignored by the program and are used for large text descriptions of code or comments that help others understand parts of the program. They begin with /* and end with */ and can span multiple lines. /* this is an enclosed block comment don’t forget the closing comment - they have to be balanced! /*
  • 43. // line comments Single line comments begin with // and end with the next line of code. Like block comments, they are ignored by the program and take no memory space. // this is a single line comment Single line comments are often used after a valid statement to provide more information about what the statement accomplishes or to provide a future reminder.
  • 45. boolean (0, 1, false, true) char (e.g. ‘a’ -128 to 127) unsigned char (0 to 255) byte (0 to 255) int (-32,768 to 32,767) unsigned int (0 to 65535) word (0 to 65535) long (-2,147,483,648 to 2,147,483,648 unsigned long (0 to 4,294,967,295) float (-3.4028235E+38 to 3.4028235E+38) double (currently same as float) sizeof(myint) // returns 2 bytes
  • 47. General Operators = (assignment operator) + (addition) - (subtraction) (multiplication) * / (division) % (modulo) == (equal to) != (not equal to) < (less than) > (greater than) <= (less than or equal to) >= (greater than or equal to) && (and) || (or) ! (not)
  • 48. x ++ // same as x = x + 1, or increments x by +1 x -- // same as x = x - 1, or decrements x by -1 x += y // same as x = x + y, or increments x by +y x -= y // same as x = x - y, or decrements x by -y x *= y // same as x = x * y, or multiplies x by y x /= y // same as x = x / y, or divides x by y
  • 55. Important notes { } curly braces Define the beginning and end of function blocks and statement blocks such as the void loop() function and the for and if statements. Void Loop() { Statement; Statement; }
  • 56. ; semicolon A semicolon must be used to end a statement and separate elements of the program. A semicolon is also used to separate elements in a for loop. int x = 13; // declares variable 'x' as the integer 13 /*… */ block comments Block comments, or multi-line comments, are areas of text ignored by the program and are used for large text descriptions of code or comments that help others understand parts of the program. They begin with /* and end with */ and can span multiple lines. /* this is an enclosed block comment don’t forget the closing comment - they have to be balanced! /*
  • 57. // line comments Single line comments begin with // and end with the next line of code. Like block comments, they are ignored by the program and take no memory space. // this is a single line comment Single line comments are often used after a valid statement to provide more information about what the statement accomplishes or to provide a future reminder.
  • 59. boolean (0, 1, false, true) char (e.g. ‘a’ -128 to 127) unsigned char (0 to 255) byte (0 to 255) int (-32,768 to 32,767) unsigned int (0 to 65535) word (0 to 65535) long (-2,147,483,648 to 2,147,483,648 unsigned long (0 to 4,294,967,295) float (-3.4028235E+38 to 3.4028235E+38) double (currently same as float) sizeof(myint) // returns 2 bytes
  • 60. General Operators = (assignment operator) + (addition) - (subtraction) (multiplication) * / (division) % (modulo) == (equal to) != (not equal to) < (less than) > (greater than) <= (less than or equal to) >= (greater than or equal to) && (and) || (or) ! (not)
  • 63. Control statements • If statement • Switch case statement • While statement • Do …. While statement • For statement
  • 64. • If statement • Switch case statement • While statement • Do …. While statement • For statement
  • 65. If statement One way selection Example If (score >= 60) grade = ‘P’ ; else grade = ‘F’ ; Example Two way selection Multiple selections Example
  • 66. Important notes { } curly braces Define the beginning and end of function blocks and statement blocks such as the void loop() function and the for and if statements. Void Loop() { Statement; Statement; }
  • 67. Compound statement (block of statements): if (age > 18) { cout << "Eligible to vote." << endl; cout << "No longer a minor." << endl; } else { cout << "Not eligible to vote." << endl; cout << "Still a minor." << endl; } Example
  • 68. Switch case statement switch structure Example
  • 69. • If statement • Switch case statement • While statement • Do …. While statement • For statement
  • 70. Example • while Looping (Repetition) • do…while Looping (Repetition) Structure (continued) Example
  • 73. Infinite loop using while and for for (;;) cout << "Hello" << endl; While(1) {cout << "Hello" << endl;}