SlideShare a Scribd company logo
1 of 25
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
Digitalandanalog. 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
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]
Data Types and operators
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); // the statements are run at least once.
While:
While(condition)
{statements;}
for
for (int i=0; i <= val; i++){
statements;
}
Loop statements:
Use break statement to stop the loop whenever needed.
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:
References…
Start learning Arduino from here…
You can download the Arduino IDE
(The program used to write code and
uploading it to arduino boards) from:
http://arduino.cc/en/Main/Software
Arduino IDE:
Here you can learn how to program Arduino and what each code
means and do, from here:
http://arduino.cc/en/Reference/HomePage
Arduino Reference:
VLSI EGY- I.GEEK – S3Geeks
Thanks for coming 

More Related Content

What's hot

Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoRichard Rixham
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingEmmanuel Obot
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoOmer Kilic
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentationxavierpaulino
 
Switch mode power supply
Switch mode power supplySwitch mode power supply
Switch mode power supplyAnish Das
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller pptRahul Kumar
 
1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoTIEEE MIU SB
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduinoavikdhupar
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino MicrocontrollerShyam Mohan
 
servo motor control using arduino
servo motor control using arduinoservo motor control using arduino
servo motor control using arduinobharath bharath
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
 
Ultrasonic sensor
Ultrasonic sensorUltrasonic sensor
Ultrasonic sensorAdarsh Raj
 

What's hot (20)

Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Arduino
ArduinoArduino
Arduino
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentation
 
Switch mode power supply
Switch mode power supplySwitch mode power supply
Switch mode power supply
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Arduino IDE
Arduino IDE Arduino IDE
Arduino IDE
 
1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
 
servo motor control using arduino
servo motor control using arduinoservo motor control using arduino
servo motor control using arduino
 
Sensors
SensorsSensors
Sensors
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
Ultrasonic sensor
Ultrasonic sensorUltrasonic sensor
Ultrasonic sensor
 

Viewers also liked

Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoEoin Brazil
 
Arduino and c programming
Arduino and c programmingArduino and c programming
Arduino and c programmingPunit Goswami
 
ROBOTICS AND ITS APPLICATIONS
ROBOTICS AND ITS APPLICATIONSROBOTICS AND ITS APPLICATIONS
ROBOTICS AND ITS APPLICATIONSAnmol Seth
 
ITT 18 Practicas Basicas de Arduino
ITT 18 Practicas Basicas de Arduino ITT 18 Practicas Basicas de Arduino
ITT 18 Practicas Basicas de Arduino El Gfe Davidson
 
Arduino Full Tutorial
Arduino Full TutorialArduino Full Tutorial
Arduino Full TutorialAkshay Sharma
 
20 Magnificos proyectos para ARDUINO
20 Magnificos proyectos para ARDUINO20 Magnificos proyectos para ARDUINO
20 Magnificos proyectos para ARDUINOdave
 
Manual basico de practicas con Arduino uno
Manual basico de practicas con Arduino unoManual basico de practicas con Arduino uno
Manual basico de practicas con Arduino unoRamiro Hernandez Michua
 
Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...
Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...
Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...Tino Fernández
 

Viewers also liked (13)

Motor driver
Motor driverMotor driver
Motor driver
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
 
Arduino and c programming
Arduino and c programmingArduino and c programming
Arduino and c programming
 
Introduction to Arduino & Robotics
Introduction to Arduino & Robotics Introduction to Arduino & Robotics
Introduction to Arduino & Robotics
 
Introduction to IOT
Introduction to IOTIntroduction to IOT
Introduction to IOT
 
IoT: An introduction
IoT: An introductionIoT: An introduction
IoT: An introduction
 
ROBOTICS AND ITS APPLICATIONS
ROBOTICS AND ITS APPLICATIONSROBOTICS AND ITS APPLICATIONS
ROBOTICS AND ITS APPLICATIONS
 
ITT 18 Practicas Basicas de Arduino
ITT 18 Practicas Basicas de Arduino ITT 18 Practicas Basicas de Arduino
ITT 18 Practicas Basicas de Arduino
 
Curso Arduino práctico 2014
Curso Arduino práctico  2014Curso Arduino práctico  2014
Curso Arduino práctico 2014
 
Arduino Full Tutorial
Arduino Full TutorialArduino Full Tutorial
Arduino Full Tutorial
 
20 Magnificos proyectos para ARDUINO
20 Magnificos proyectos para ARDUINO20 Magnificos proyectos para ARDUINO
20 Magnificos proyectos para ARDUINO
 
Manual basico de practicas con Arduino uno
Manual basico de practicas con Arduino unoManual basico de practicas con Arduino uno
Manual basico de practicas con Arduino uno
 
Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...
Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...
Libro de proyectos del kit oficial de Arduino en castellano completo - Arduin...
 

Similar to Introduction to arduino

introductiontoarduino-130219180141-phpapp01.pdf
introductiontoarduino-130219180141-phpapp01.pdfintroductiontoarduino-130219180141-phpapp01.pdf
introductiontoarduino-130219180141-phpapp01.pdfvaithyavaled
 
introductiontoarduino-130219180141-phpapp01 (1).pptx
introductiontoarduino-130219180141-phpapp01 (1).pptxintroductiontoarduino-130219180141-phpapp01 (1).pptx
introductiontoarduino-130219180141-phpapp01 (1).pptxAanshuSingh3
 
Introduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotIntroduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotSachin S
 
arduino-1.pptxbxavvgAzccgzs fla sh ga aana
arduino-1.pptxbxavvgAzccgzs fla sh ga aanaarduino-1.pptxbxavvgAzccgzs fla sh ga aana
arduino-1.pptxbxavvgAzccgzs fla sh ga aanaShristi60834
 
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
 
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
 
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
Automation and Robotics 20ME51I_Week_2_Practicals.pdfAutomation and Robotics 20ME51I_Week_2_Practicals.pdf
Automation and Robotics 20ME51I_Week_2_Practicals.pdfGandhibabu8
 
Notes arduino workshop_15
Notes arduino workshop_15Notes arduino workshop_15
Notes arduino workshop_15Faiz Lazim
 
Arduino_Beginner.pptx
Arduino_Beginner.pptxArduino_Beginner.pptx
Arduino_Beginner.pptxshivagoud45
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalTony Olsson.
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalTony Olsson.
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfssusere5db05
 

Similar to Introduction to arduino (20)

introductiontoarduino-130219180141-phpapp01.pdf
introductiontoarduino-130219180141-phpapp01.pdfintroductiontoarduino-130219180141-phpapp01.pdf
introductiontoarduino-130219180141-phpapp01.pdf
 
arduino
arduinoarduino
arduino
 
introductiontoarduino-130219180141-phpapp01 (1).pptx
introductiontoarduino-130219180141-phpapp01 (1).pptxintroductiontoarduino-130219180141-phpapp01 (1).pptx
introductiontoarduino-130219180141-phpapp01 (1).pptx
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
Introduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotIntroduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to Iot
 
arduino-1.pptxbxavvgAzccgzs fla sh ga aana
arduino-1.pptxbxavvgAzccgzs fla sh ga aanaarduino-1.pptxbxavvgAzccgzs fla sh ga aana
arduino-1.pptxbxavvgAzccgzs fla sh ga aana
 
The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2The iot academy_embeddedsystems_training_basicselectronicspart2
The iot academy_embeddedsystems_training_basicselectronicspart2
 
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)
 
SCSA1407.pdf
SCSA1407.pdfSCSA1407.pdf
SCSA1407.pdf
 
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
Automation and Robotics 20ME51I_Week_2_Practicals.pdfAutomation and Robotics 20ME51I_Week_2_Practicals.pdf
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
 
Introduction of digital system
Introduction of digital systemIntroduction of digital system
Introduction of digital system
 
Notes arduino workshop_15
Notes arduino workshop_15Notes arduino workshop_15
Notes arduino workshop_15
 
embedded system
embedded system  embedded system
embedded system
 
Arduino_Beginner.pptx
Arduino_Beginner.pptxArduino_Beginner.pptx
Arduino_Beginner.pptx
 
Random number generator
Random number generatorRandom number generator
Random number generator
 
ARDUINO Presentation1.pptx
ARDUINO Presentation1.pptxARDUINO Presentation1.pptx
ARDUINO Presentation1.pptx
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
our 1st project
our 1st projectour 1st project
our 1st project
 

More from Ahmed Sakr

Lead-acid standby Battery charger.
Lead-acid standby Battery charger.Lead-acid standby Battery charger.
Lead-acid standby Battery charger.Ahmed Sakr
 
Noise in RF microelectronics
Noise in RF microelectronicsNoise in RF microelectronics
Noise in RF microelectronicsAhmed Sakr
 
Subsampling Multi-standard receiver design, Part-1
Subsampling Multi-standard receiver design, Part-1Subsampling Multi-standard receiver design, Part-1
Subsampling Multi-standard receiver design, Part-1Ahmed Sakr
 
RF Microelectronics - Basic concepts - nonlinearity
RF Microelectronics - Basic concepts - nonlinearityRF Microelectronics - Basic concepts - nonlinearity
RF Microelectronics - Basic concepts - nonlinearityAhmed Sakr
 
برمجة الأردوينو - اليوم الثالث.
برمجة الأردوينو - اليوم الثالث. برمجة الأردوينو - اليوم الثالث.
برمجة الأردوينو - اليوم الثالث. Ahmed Sakr
 
برمجة الأردوينو - اليوم الثاني
برمجة الأردوينو - اليوم الثانيبرمجة الأردوينو - اليوم الثاني
برمجة الأردوينو - اليوم الثانيAhmed Sakr
 
برمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولبرمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولAhmed Sakr
 
أمة ريادة الأعمال - نموذج إسرائيل
أمة ريادة الأعمال - نموذج إسرائيلأمة ريادة الأعمال - نموذج إسرائيل
أمة ريادة الأعمال - نموذج إسرائيلAhmed Sakr
 
The engineers we need
The engineers we needThe engineers we need
The engineers we needAhmed Sakr
 
الأندلس درة العالم
الأندلس درة العالمالأندلس درة العالم
الأندلس درة العالمAhmed Sakr
 
Marketing research
Marketing research Marketing research
Marketing research Ahmed Sakr
 
Projects types
Projects types Projects types
Projects types Ahmed Sakr
 
Project managment - What a project is .
Project managment  - What a project is .Project managment  - What a project is .
Project managment - What a project is .Ahmed Sakr
 

More from Ahmed Sakr (13)

Lead-acid standby Battery charger.
Lead-acid standby Battery charger.Lead-acid standby Battery charger.
Lead-acid standby Battery charger.
 
Noise in RF microelectronics
Noise in RF microelectronicsNoise in RF microelectronics
Noise in RF microelectronics
 
Subsampling Multi-standard receiver design, Part-1
Subsampling Multi-standard receiver design, Part-1Subsampling Multi-standard receiver design, Part-1
Subsampling Multi-standard receiver design, Part-1
 
RF Microelectronics - Basic concepts - nonlinearity
RF Microelectronics - Basic concepts - nonlinearityRF Microelectronics - Basic concepts - nonlinearity
RF Microelectronics - Basic concepts - nonlinearity
 
برمجة الأردوينو - اليوم الثالث.
برمجة الأردوينو - اليوم الثالث. برمجة الأردوينو - اليوم الثالث.
برمجة الأردوينو - اليوم الثالث.
 
برمجة الأردوينو - اليوم الثاني
برمجة الأردوينو - اليوم الثانيبرمجة الأردوينو - اليوم الثاني
برمجة الأردوينو - اليوم الثاني
 
برمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولبرمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأول
 
أمة ريادة الأعمال - نموذج إسرائيل
أمة ريادة الأعمال - نموذج إسرائيلأمة ريادة الأعمال - نموذج إسرائيل
أمة ريادة الأعمال - نموذج إسرائيل
 
The engineers we need
The engineers we needThe engineers we need
The engineers we need
 
الأندلس درة العالم
الأندلس درة العالمالأندلس درة العالم
الأندلس درة العالم
 
Marketing research
Marketing research Marketing research
Marketing research
 
Projects types
Projects types Projects types
Projects types
 
Project managment - What a project is .
Project managment  - What a project is .Project managment  - What a project is .
Project managment - What a project is .
 

Recently uploaded

Benefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBenefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBrantfordIndia
 
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls AgencyCall Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls Agencykojalkojal131
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfAmitRout25
 
English basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfEnglish basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfbromerom1
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi OneDay18
 
The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)Shakti Savarn
 
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Mikko Kangassalo
 

Recently uploaded (7)

Benefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBenefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in India
 
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls AgencyCall Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdf
 
English basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfEnglish basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdf
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi
 
The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)
 
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
 

Introduction to 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. Digitalandanalog. 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. 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] Data Types and operators 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); // the statements are run at least once. While: While(condition) {statements;} for for (int i=0; i <= val; i++){ statements; } Loop statements: Use break statement to stop the loop whenever needed.
  • 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:
  • 23. You can download the Arduino IDE (The program used to write code and uploading it to arduino boards) from: http://arduino.cc/en/Main/Software Arduino IDE:
  • 24. Here you can learn how to program Arduino and what each code means and do, from here: http://arduino.cc/en/Reference/HomePage Arduino Reference:
  • 25. VLSI EGY- I.GEEK – S3Geeks Thanks for coming 

Editor's Notes

  1. This presentation demonstrates the new capabilities of PowerPoint and it is best viewed in Slide Show. These slides are designed to give you great ideas for the presentations you’ll create in PowerPoint 2010! For more sample templates, click the File tab, and then on the New tab, click Sample Templates.
  2. http://hades.mech.northwestern.edu/index.php/Optoreflector http://hades.mech.northwestern.edu/index.php/Optointerrupter
  3. http://hades.mech.northwestern.edu/index.php/Optoreflector http://hades.mech.northwestern.edu/index.php/Optointerrupter http://learn.parallax.com/node/299