SlideShare una empresa de Scribd logo
1 de 22
Line follower competition.
Introduction to...
Arduino
Contents:
 Introduction [20 min]:
1. What is Micro-Controller?
2. What is Arduino?
3. Types of Arduino.
4. Arduino UNO board.
5. Sensors:
- Digital, Analog sensors.
- Light sensors [IR sensor, Photo-Resistor].
 Coding structure and examples [30 min]:
1. Data types and operators.
2. What is “Function”?
3. Control statements [if, if… else, switch case.].
4. Loop statements[while, for, do… while.].
5. Common functions.
 Workshop[20 min] DC motor control:
Introduction
Design, organize, and collaborate
Famous microcontroller
manufacturers are MicroChip,
Atmel, Intel, Analog devices, and
more.
[list]
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.
Micro-Controller:
Arduino. What is Arduino?
A microcontroller 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 to any 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 one himself.
Arduino boards:
UNO Mega LilyPad
Arduino BT Arduino Nano Arduino Mini
Arduino UNO:
Digital output
~: PWM.
0,1: Serial port.
In circuit Serial
programming
Atmel
MicroController
Analog input.
Power Supply
USB port
Power input
Digital
and
analog. Digital or Analog?
All physical quantities are analog.
Analog means that the quantity can take any value between its
minimum value and maximum value.
Digital means that the quantity can take specific levels of values
with specific offset between each other.
Ex: 1- Digital:
English alpha consists of 26 letter, there is no letter between A
and B.
- Square waves are Digital.
Ex.: 2- Analog:
Temperature, can take any value[-1,12.8,25.002,… etc.].
- Sine waves are analog.
Sensors Sensors:
A device that transforms the physical quantity into electrical
value.
Ex.: Light sensor transduce the light into change in voltage or
resistance.
Sensors Light sensors:
- Photo-Resistor [photo-cell].
- Photo-Diode.
- Photo-Transistor.
Sensors Photo Resistor:
- The value of the resistance depends on
the incident light density.
- 1 K-Ohm at light, 10 K-Ohm at
darkness.
Photo Diode:
- The current is controlled by the incident light density.
Photo Transistor:
- Base-emitter junction is controlled
by the incident light density, has an
amplification effect.
Arduino Coding.
Stylize, edit, and animate your media
Data Types and operators
Integer: used with integer variables with value between
2147483647 and -2147483647.
Ex: int x=1200;
Character: used with single character, represent value from -
127 to 128.
Ex. char c=‘r’;
Long: Long variables are extended size variables for number
storage, and store 32 bits (4 bytes), from -2,147,483,648 to
2,147,483,647.
Ex. long u=199203;
Floating-point numbers can be as large as 3.4028235E+38
and as low as -3.4028235E+38. They are stored as 32 bits (4
bytes) of information.
Ex. float num=1.291; [The same as double type]
You may need to know about these typed: Array, Boolean, byte, etc. here.
Statement represents a command, it ends with ;
Ex:
int x;
x=13;
Operators are symbols that used to indicate a specific
function:
- Math operators: [+,-,*,/,%,^]
- Logic operators: [==, !=, &&, ||]
-Comparison operators: [==, >, <, !=, <=, >=]
Syntax:
; Semicolon, {} curly braces, //single line
comment, /*Multi-line comments*/
Statement and operators:
Compound Operators:
++ (increment)
-- (decrement)
+= (compound addition)
-= (compound subtraction)
*= (compound multiplication)
/= (compound division)
Statement and operators:
If Conditioning:
if(condition)
{
statements-1;
…
Statement-N;
}
else if(condition2)
{
Statements;
}
Else{statements;}
Control statements:
Switch case:
switch (var) {
case 1:
//do something when var equals 1
break;
case 2:
//do something when var equals 2
break;
default:
// if nothing else matches, do the default
// default is optional
}
Control statements:
Do… while:
do
{
Statements;
}
while(condition);
While:
While(condition)
{statements;}
for
// the statements are run at least once.
for (int i=0; i <= val; i++){
statements;
}
Use break statement to stop the loop whenever needed.
Loop statements:
Void setup(){}
Used to indicate the initial values of system on starting.
Void loop(){}
Contains the statements that will run whenever the
system is powered after setup.
Code structure:
Led blinking example:
Used functions:
pinMode();
digitalRead();
digitalWrite();
delay(time_ms);
other functions:
analogRead();
analogWrite();//PWM.
Input and output:
Motor control using Arduino:
Make a motor rotate 2 sec clockwise, and 5 sec counter-
clockwise in an infinite loop;
Time: 10 min.
Workshop:
IEEE MiniaSB.
Thanks for coming 

Más contenido relacionado

Similar a arduino

The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The IOT Academy
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingEmmanuel Obot
 
CPDS FUNDAMENTALS.pptx
CPDS FUNDAMENTALS.pptxCPDS FUNDAMENTALS.pptx
CPDS FUNDAMENTALS.pptxmadhurij54
 
EEEM048_Lecture3_HardwarePlatform.pdf
EEEM048_Lecture3_HardwarePlatform.pdfEEEM048_Lecture3_HardwarePlatform.pdf
EEEM048_Lecture3_HardwarePlatform.pdfssuser25ed54
 
Embedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEmbedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEr. Raju Bhardwaj
 
Ecd302 unit 05(misc simulation tools)(new version)
Ecd302 unit 05(misc simulation tools)(new version)Ecd302 unit 05(misc simulation tools)(new version)
Ecd302 unit 05(misc simulation tools)(new version)Xi Qiu
 
CSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitCSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitYhal Htet Aung
 
10 11_gen_revision_notes_term_3
10  11_gen_revision_notes_term_310  11_gen_revision_notes_term_3
10 11_gen_revision_notes_term_3CDI Aljeer
 
Computer Organization and Architecture ppt .pptx
Computer Organization and Architecture ppt .pptxComputer Organization and Architecture ppt .pptx
Computer Organization and Architecture ppt .pptxSURESHKUMARMURK22DS4
 
COA Chapter 1.pdf
COA Chapter 1.pdfCOA Chapter 1.pdf
COA Chapter 1.pdfAbelAteme
 
Tutorial Arach N!D
Tutorial Arach N!DTutorial Arach N!D
Tutorial Arach N!Dkameshsept
 
Embedded Application on Microcontroller in Assembly and Embedded C
Embedded Application on Microcontroller in Assembly and Embedded CEmbedded Application on Microcontroller in Assembly and Embedded C
Embedded Application on Microcontroller in Assembly and Embedded CAvinash Reddy Penugonda
 
Basics of computer and Number conversions.pdf
Basics of computer and Number conversions.pdfBasics of computer and Number conversions.pdf
Basics of computer and Number conversions.pdfMrsJayamaryAComputer
 

Similar a arduino (20)

Introduction of digital system
Introduction of digital systemIntroduction of digital system
Introduction of digital system
 
The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
CPDS FUNDAMENTALS.pptx
CPDS FUNDAMENTALS.pptxCPDS FUNDAMENTALS.pptx
CPDS FUNDAMENTALS.pptx
 
SCSA1407.pdf
SCSA1407.pdfSCSA1407.pdf
SCSA1407.pdf
 
EEEM048_Lecture3_HardwarePlatform.pdf
EEEM048_Lecture3_HardwarePlatform.pdfEEEM048_Lecture3_HardwarePlatform.pdf
EEEM048_Lecture3_HardwarePlatform.pdf
 
Embedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEmbedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower Bot
 
Ecd302 unit 05(misc simulation tools)(new version)
Ecd302 unit 05(misc simulation tools)(new version)Ecd302 unit 05(misc simulation tools)(new version)
Ecd302 unit 05(misc simulation tools)(new version)
 
CSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System UnitCSC1100 - Chapter02 - Components of the System Unit
CSC1100 - Chapter02 - Components of the System Unit
 
10 11_gen_revision_notes_term_3
10  11_gen_revision_notes_term_310  11_gen_revision_notes_term_3
10 11_gen_revision_notes_term_3
 
embedded system
embedded system  embedded system
embedded system
 
Computer Organization and Architecture ppt .pptx
Computer Organization and Architecture ppt .pptxComputer Organization and Architecture ppt .pptx
Computer Organization and Architecture ppt .pptx
 
COA Chapter 1.pdf
COA Chapter 1.pdfCOA Chapter 1.pdf
COA Chapter 1.pdf
 
Sensors.pptx
Sensors.pptxSensors.pptx
Sensors.pptx
 
Tutorial Arach N!D
Tutorial Arach N!DTutorial Arach N!D
Tutorial Arach N!D
 
Random number generator
Random number generatorRandom number generator
Random number generator
 
Embedded Application on Microcontroller in Assembly and Embedded C
Embedded Application on Microcontroller in Assembly and Embedded CEmbedded Application on Microcontroller in Assembly and Embedded C
Embedded Application on Microcontroller in Assembly and Embedded C
 
Basics of computer and Number conversions.pdf
Basics of computer and Number conversions.pdfBasics of computer and Number conversions.pdf
Basics of computer and Number conversions.pdf
 

Más de RabiaAsif31

Robot Architecture.pptx
Robot Architecture.pptxRobot Architecture.pptx
Robot Architecture.pptxRabiaAsif31
 
ROBOTS THAT CHANGE SHAPE pertation.pptx
ROBOTS THAT CHANGE SHAPE pertation.pptxROBOTS THAT CHANGE SHAPE pertation.pptx
ROBOTS THAT CHANGE SHAPE pertation.pptxRabiaAsif31
 
Web design-1.pptx
Web design-1.pptxWeb design-1.pptx
Web design-1.pptxRabiaAsif31
 
Robot Architecture.pptx
Robot Architecture.pptxRobot Architecture.pptx
Robot Architecture.pptxRabiaAsif31
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptRabiaAsif31
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptxRabiaAsif31
 
worksheet-CS-1.docx
worksheet-CS-1.docxworksheet-CS-1.docx
worksheet-CS-1.docxRabiaAsif31
 

Más de RabiaAsif31 (9)

Robot Architecture.pptx
Robot Architecture.pptxRobot Architecture.pptx
Robot Architecture.pptx
 
ROBOTS THAT CHANGE SHAPE pertation.pptx
ROBOTS THAT CHANGE SHAPE pertation.pptxROBOTS THAT CHANGE SHAPE pertation.pptx
ROBOTS THAT CHANGE SHAPE pertation.pptx
 
Software.pptx
Software.pptxSoftware.pptx
Software.pptx
 
Web design-1.pptx
Web design-1.pptxWeb design-1.pptx
Web design-1.pptx
 
Robot Architecture.pptx
Robot Architecture.pptxRobot Architecture.pptx
Robot Architecture.pptx
 
Robots.pptx
Robots.pptxRobots.pptx
Robots.pptx
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
worksheet-CS-1.docx
worksheet-CS-1.docxworksheet-CS-1.docx
worksheet-CS-1.docx
 

Último

Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsappssapnasaifi408
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...Pooja Nehwal
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
 
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...nagunakhan
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一ga6c6bdl
 
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...Call Girls in Nagpur High Profile
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...ranjana rawat
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...ranjana rawat
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...nagunakhan
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查awo24iot
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 

Último (20)

Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
 
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
 
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
VVIP Pune Call Girls Warje (7001035870) Pune Escorts Nearby with Complete Sat...
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 

arduino

  • 2. Contents:  Introduction [20 min]: 1. What is Micro-Controller? 2. What is Arduino? 3. Types of Arduino. 4. Arduino UNO board. 5. Sensors: - Digital, Analog sensors. - Light sensors [IR sensor, Photo-Resistor].  Coding structure and examples [30 min]: 1. Data types and operators. 2. What is “Function”? 3. Control statements [if, if… else, switch case.]. 4. Loop statements[while, for, do… while.]. 5. Common functions.  Workshop[20 min] DC motor control:
  • 4. Famous microcontroller manufacturers are MicroChip, Atmel, Intel, Analog devices, and more. [list] 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. Micro-Controller:
  • 5. Arduino. What is Arduino? A microcontroller 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 to any 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 one himself.
  • 6. Arduino boards: UNO Mega LilyPad Arduino BT Arduino Nano Arduino Mini
  • 7. Arduino UNO: Digital output ~: PWM. 0,1: Serial port. In circuit Serial programming Atmel MicroController Analog input. Power Supply USB port Power input
  • 8. Digital and analog. Digital or Analog? All physical quantities are analog. Analog means that the quantity can take any value between its minimum value and maximum value. Digital means that the quantity can take specific levels of values with specific offset between each other. Ex: 1- Digital: English alpha consists of 26 letter, there is no letter between A and B. - Square waves are Digital. Ex.: 2- Analog: Temperature, can take any value[-1,12.8,25.002,… etc.]. - Sine waves are analog.
  • 9. Sensors Sensors: A device that transforms the physical quantity into electrical value. Ex.: Light sensor transduce the light into change in voltage or resistance.
  • 10. Sensors Light sensors: - Photo-Resistor [photo-cell]. - Photo-Diode. - Photo-Transistor.
  • 11. Sensors Photo Resistor: - The value of the resistance depends on the incident light density. - 1 K-Ohm at light, 10 K-Ohm at darkness. Photo Diode: - The current is controlled by the incident light density. Photo Transistor: - Base-emitter junction is controlled by the incident light density, has an amplification effect.
  • 12. Arduino Coding. Stylize, edit, and animate your media
  • 13. Data Types and operators Integer: used with integer variables with value between 2147483647 and -2147483647. Ex: int x=1200; Character: used with single character, represent value from - 127 to 128. Ex. char c=‘r’; Long: Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647. Ex. long u=199203; Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38. They are stored as 32 bits (4 bytes) of information. Ex. float num=1.291; [The same as double type] You may need to know about these typed: Array, Boolean, byte, etc. here.
  • 14. Statement represents a command, it ends with ; Ex: int x; x=13; Operators are symbols that used to indicate a specific function: - Math operators: [+,-,*,/,%,^] - Logic operators: [==, !=, &&, ||] -Comparison operators: [==, >, <, !=, <=, >=] Syntax: ; Semicolon, {} curly braces, //single line comment, /*Multi-line comments*/ Statement and operators:
  • 15. Compound Operators: ++ (increment) -- (decrement) += (compound addition) -= (compound subtraction) *= (compound multiplication) /= (compound division) Statement and operators:
  • 17. Switch case: switch (var) { case 1: //do something when var equals 1 break; case 2: //do something when var equals 2 break; default: // if nothing else matches, do the default // default is optional } Control statements:
  • 18. Do… while: do { Statements; } while(condition); While: While(condition) {statements;} for // the statements are run at least once. for (int i=0; i <= val; i++){ statements; } Use break statement to stop the loop whenever needed. Loop statements:
  • 19. Void setup(){} Used to indicate the initial values of system on starting. Void loop(){} Contains the statements that will run whenever the system is powered after setup. Code structure:
  • 20. Led blinking example: Used functions: pinMode(); digitalRead(); digitalWrite(); delay(time_ms); other functions: analogRead(); analogWrite();//PWM. Input and output:
  • 21. Motor control using Arduino: Make a motor rotate 2 sec clockwise, and 5 sec counter- clockwise in an infinite loop; Time: 10 min. Workshop: