SlideShare a Scribd company logo
1 of 25
ARDUINO
BY
SALIH MAHMOD
What is arduino
 Arduino is an open-source prototyping platform based on
easy-to-use hardware and software. Arduino boards are
able to read inputs - light on a sensor, a finger on a
button, or a Twitter message - and turn it into an output -
activating a motor, turning on an LED, publishing
something online. You can tell your board what to do by
sending a set of instructions to the microcontroller on the
board. To do so you use the arduino programming
language (based on wiring), and the arduino software
(IDE), based on processing .
Arduino development process
 Level1 based on 8 bit mcu like arduino uno ,mega ,nano , micro, lilypad
and demulive
Arduino development process
 Level2 based on 32 bit mcu like arduino due , zero and teensyduino
Arduino development process
 Level3 FPGA boards with mcu and programmed by arduino software
platform like papilio pro , one and duo .
Arduino architecture
 We will talk here about more common board arduino uno
Digital and Analog
Arduino programming platform (IDE)
 we program arduino using an programming languge named
“Arduino c” also we can program it using matlab , labview
,python ,c# ,flowcode and embedded c
 To start with arduio
1- download the arduino software (IDE)
2- connect the board
3- install the drivers
4- launch the arduino application
5- write code or open an example
6- select your board
7- select your serial port
8- upload the program
Arduino IDE
 Here we will go to arduino IDE to see it
Arduino c program body
-‫المتغيرات‬ ‫عن‬ ‫االعالن‬ ‫يتم‬
‫وانواعها‬ ‫وقيمها‬
-‫ت‬ ‫التي‬ ‫الدوال‬ ‫كتابة‬ ‫يتم‬‫نفذ‬
‫التشغيل‬ ‫عند‬ ‫واحدة‬ ‫مرة‬
-‫يع‬ ‫التي‬ ‫الدوال‬ ‫كتابة‬ ‫يتم‬‫اد‬
‫حيث‬ ‫دورة‬ ‫كل‬ ‫تنفيذها‬
‫بهذا‬ ‫يكتب‬ ‫الذي‬ ‫البرنامج‬
‫بصور‬ ‫يتكرر‬ ‫يبقى‬ ‫الجزء‬‫ة‬
‫النهائية‬ ‫حلقة‬
Data type
Digital I/O
 pinMode(pin, mode);
pin:- the number of the pin whose mode you wish to set
mode:- INPUT or OUTPUT
 digitalWrite(pin, value);
pin:- the pin number
value:- HIGH or LOW
 digitalRead(pin);
pin:- the number of the digital pin you want to read (int)
returns:- HIGH or LOW
Pullup and pulldown resistors
 If a pull-down resistor is used, the input pin will be LOW when the switch is
open and HIGH when the switch is closed.
 If a pull-up resistor is used, the input pin will be HIGH when the switch is
open and LOW when the switch is closed.
-To active pullup resistor in
arduino use this function
pinMode(2,INPUT_PULLUP)
;
this active pullup for pin 2
therefore
we will connect switch
between GND and pin2
Analog I/O
 analogRead(pin);
pin:- the number of the analog input pin to read from (0 to
5 on most boards)
returns:- int (0 to 1023)
 analogWrite(pin, value);
pin:- the pin to write to.
value:- the duty cycle: between 0 (always off) and 255
(always on).
Here we haven't DAC to generate an analog output but we
use PWM
PWM(Pulse Width Modulation)
- PWM, is a technique for getting
analog results with digital means.
Digital control is used to create a
square wave, a signal switched
between on and off. This on-off
pattern can simulate voltages in
between full on (5 Volts) and off (0
Volts) by changing the portion of
the time the signal spends on
versus the time that the signal
spends off.
Time functions
 millis() ;
Returns the number of milliseconds since the Arduino board began
running the current program. This number will overflow (go back to
zero), after approximately 50 days
 micros() ;
returns the number of microseconds since the Arduino board
began running the current program. This number will overflow (go
back to zero), after approximately 70 minutes.
 delay(ms) ;
ms: the number of milliseconds to pause (unsigned long)
Blink code example
Hardware Required
- Arduino Board
- LED
- resistor less than
1kohm
Blink code example
 void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Analog example I/O
Arduino shields
Arduino libraries
 Libraries are a collection of
code that makes it easy for
you to connect to a sensor,
display, module, etc. For
example, the built-
in LiquidCrystal library
makes it easy to talk to
character LCD displays.
There are hundreds of
additional libraries available
on the Internet for download.
Liquid crystal code example
Sensors and actuators
Sensors and actuators
Arduino اردوينو

More Related Content

What's hot

Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
Wingston
 

What's hot (20)

Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Esp32 cam arduino-123
Esp32 cam arduino-123Esp32 cam arduino-123
Esp32 cam arduino-123
 
Arduino
ArduinoArduino
Arduino
 
Arduino
ArduinoArduino
Arduino
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
 
Arduino presentation
Arduino presentationArduino presentation
Arduino presentation
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Basic Sensors
Basic Sensors Basic Sensors
Basic Sensors
 
Different Arduino Boards
Different Arduino BoardsDifferent Arduino Boards
Different Arduino Boards
 
Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
Microprocessor & Micro-controller
Microprocessor & Micro-controllerMicroprocessor & Micro-controller
Microprocessor & Micro-controller
 
Microprocessor-Based Automatic Door Opener
Microprocessor-Based Automatic Door OpenerMicroprocessor-Based Automatic Door Opener
Microprocessor-Based Automatic Door Opener
 
شاشات اللمس والتحكم الصناعي hmi
شاشات اللمس والتحكم الصناعي hmi شاشات اللمس والتحكم الصناعي hmi
شاشات اللمس والتحكم الصناعي hmi
 
Intro to Arduino.ppt
Intro to Arduino.pptIntro to Arduino.ppt
Intro to Arduino.ppt
 

Viewers also liked

Hardware startup v3
Hardware startup v3Hardware startup v3
Hardware startup v3
yahya tawil
 
أنواع أجهزة الحاسب
أنواع أجهزة الحاسبأنواع أجهزة الحاسب
أنواع أجهزة الحاسب
tahanisaad
 

Viewers also liked (20)

Fablogiapresent
FablogiapresentFablogiapresent
Fablogiapresent
 
Senior Project Presentation
Senior Project PresentationSenior Project Presentation
Senior Project Presentation
 
الدارة الكهربائية البسيطة
الدارة الكهربائية البسيطةالدارة الكهربائية البسيطة
الدارة الكهربائية البسيطة
 
ميكروكنترولر بشرح م احمد سميرفايد
ميكروكنترولر بشرح م احمد سميرفايدميكروكنترولر بشرح م احمد سميرفايد
ميكروكنترولر بشرح م احمد سميرفايد
 
c++ كتاب برمجه
  c++ كتاب برمجه  c++ كتاب برمجه
c++ كتاب برمجه
 
Oh intro
Oh introOh intro
Oh intro
 
Hardware startup v3
Hardware startup v3Hardware startup v3
Hardware startup v3
 
برمجة الأردوينو لليافعين
برمجة الأردوينو لليافعينبرمجة الأردوينو لليافعين
برمجة الأردوينو لليافعين
 
Oh intro v2
Oh intro v2Oh intro v2
Oh intro v2
 
Hardware startup
Hardware startup Hardware startup
Hardware startup
 
برمجة الأردوينو - اليوم الثاني
برمجة الأردوينو - اليوم الثانيبرمجة الأردوينو - اليوم الثاني
برمجة الأردوينو - اليوم الثاني
 
التعامل مع بيئة برمجة أردوينو
التعامل مع بيئة برمجة أردوينوالتعامل مع بيئة برمجة أردوينو
التعامل مع بيئة برمجة أردوينو
 
أساسيات الحساسات والإشارة التماثلية في الأردوينو لليافعين
أساسيات الحساسات والإشارة التماثلية في الأردوينو لليافعينأساسيات الحساسات والإشارة التماثلية في الأردوينو لليافعين
أساسيات الحساسات والإشارة التماثلية في الأردوينو لليافعين
 
درس أنواع أجهزة الحاسب الآلي أول متوسط
درس أنواع أجهزة الحاسب الآلي أول متوسطدرس أنواع أجهزة الحاسب الآلي أول متوسط
درس أنواع أجهزة الحاسب الآلي أول متوسط
 
أنواع أجهزة الحاسب
أنواع أجهزة الحاسبأنواع أجهزة الحاسب
أنواع أجهزة الحاسب
 
Business Model Canvas (Arabic) - نموذج العمل التجاري
Business Model Canvas (Arabic) - نموذج العمل التجاريBusiness Model Canvas (Arabic) - نموذج العمل التجاري
Business Model Canvas (Arabic) - نموذج العمل التجاري
 
Value Proposition Design (Arabic ) - تصميم القيمة المقدمة
Value Proposition Design (Arabic ) - تصميم القيمة المقدمة Value Proposition Design (Arabic ) - تصميم القيمة المقدمة
Value Proposition Design (Arabic ) - تصميم القيمة المقدمة
 
Business Model Canvas Poster - English
Business Model Canvas Poster - EnglishBusiness Model Canvas Poster - English
Business Model Canvas Poster - English
 
Business Model Canvas In Arabic - إبتكار نموذج العمل التجاري
Business Model Canvas In Arabic - إبتكار نموذج العمل التجاري Business Model Canvas In Arabic - إبتكار نموذج العمل التجاري
Business Model Canvas In Arabic - إبتكار نموذج العمل التجاري
 
تصميم وإبتكار نماذج الأعمال أو النماذج الربحية Business Models
تصميم وإبتكار نماذج الأعمال أو النماذج الربحية Business Modelsتصميم وإبتكار نماذج الأعمال أو النماذج الربحية Business Models
تصميم وإبتكار نماذج الأعمال أو النماذج الربحية Business Models
 

Similar to Arduino اردوينو

Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
HebaEng
 

Similar to Arduino اردوينو (20)

Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensors
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
What is arduino
What is arduinoWhat is arduino
What is arduino
 
Introduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).pptIntroduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).ppt
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
Ch_2_8,9,10.pptx
Ch_2_8,9,10.pptxCh_2_8,9,10.pptx
Ch_2_8,9,10.pptx
 

More from salih mahmod

More from salih mahmod (6)

ابتكار من اجل التنمية 2016
ابتكار من اجل التنمية 2016ابتكار من اجل التنمية 2016
ابتكار من اجل التنمية 2016
 
innovation for development ابتكار من اجل التنمية
innovation for development  ابتكار من اجل التنمية innovation for development  ابتكار من اجل التنمية
innovation for development ابتكار من اجل التنمية
 
Embedded systems الانظمة المدمجة
Embedded systems  الانظمة المدمجة Embedded systems  الانظمة المدمجة
Embedded systems الانظمة المدمجة
 
Hackerspace & mosulspace
Hackerspace & mosulspace Hackerspace & mosulspace
Hackerspace & mosulspace
 
Enterpreneutship - ريادة الاعمال
Enterpreneutship - ريادة الاعمالEnterpreneutship - ريادة الاعمال
Enterpreneutship - ريادة الاعمال
 
Design thinking - التفكير التصميمي
Design thinking - التفكير التصميمي Design thinking - التفكير التصميمي
Design thinking - التفكير التصميمي
 

Recently uploaded

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 

Arduino اردوينو

  • 2. What is arduino  Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the arduino programming language (based on wiring), and the arduino software (IDE), based on processing .
  • 3. Arduino development process  Level1 based on 8 bit mcu like arduino uno ,mega ,nano , micro, lilypad and demulive
  • 4. Arduino development process  Level2 based on 32 bit mcu like arduino due , zero and teensyduino
  • 5. Arduino development process  Level3 FPGA boards with mcu and programmed by arduino software platform like papilio pro , one and duo .
  • 6. Arduino architecture  We will talk here about more common board arduino uno
  • 8. Arduino programming platform (IDE)  we program arduino using an programming languge named “Arduino c” also we can program it using matlab , labview ,python ,c# ,flowcode and embedded c  To start with arduio 1- download the arduino software (IDE) 2- connect the board 3- install the drivers 4- launch the arduino application 5- write code or open an example 6- select your board 7- select your serial port 8- upload the program
  • 9. Arduino IDE  Here we will go to arduino IDE to see it
  • 10. Arduino c program body -‫المتغيرات‬ ‫عن‬ ‫االعالن‬ ‫يتم‬ ‫وانواعها‬ ‫وقيمها‬ -‫ت‬ ‫التي‬ ‫الدوال‬ ‫كتابة‬ ‫يتم‬‫نفذ‬ ‫التشغيل‬ ‫عند‬ ‫واحدة‬ ‫مرة‬ -‫يع‬ ‫التي‬ ‫الدوال‬ ‫كتابة‬ ‫يتم‬‫اد‬ ‫حيث‬ ‫دورة‬ ‫كل‬ ‫تنفيذها‬ ‫بهذا‬ ‫يكتب‬ ‫الذي‬ ‫البرنامج‬ ‫بصور‬ ‫يتكرر‬ ‫يبقى‬ ‫الجزء‬‫ة‬ ‫النهائية‬ ‫حلقة‬
  • 12. Digital I/O  pinMode(pin, mode); pin:- the number of the pin whose mode you wish to set mode:- INPUT or OUTPUT  digitalWrite(pin, value); pin:- the pin number value:- HIGH or LOW  digitalRead(pin); pin:- the number of the digital pin you want to read (int) returns:- HIGH or LOW
  • 13. Pullup and pulldown resistors  If a pull-down resistor is used, the input pin will be LOW when the switch is open and HIGH when the switch is closed.  If a pull-up resistor is used, the input pin will be HIGH when the switch is open and LOW when the switch is closed. -To active pullup resistor in arduino use this function pinMode(2,INPUT_PULLUP) ; this active pullup for pin 2 therefore we will connect switch between GND and pin2
  • 14. Analog I/O  analogRead(pin); pin:- the number of the analog input pin to read from (0 to 5 on most boards) returns:- int (0 to 1023)  analogWrite(pin, value); pin:- the pin to write to. value:- the duty cycle: between 0 (always off) and 255 (always on). Here we haven't DAC to generate an analog output but we use PWM
  • 15. PWM(Pulse Width Modulation) - PWM, is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off.
  • 16. Time functions  millis() ; Returns the number of milliseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days  micros() ; returns the number of microseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 70 minutes.  delay(ms) ; ms: the number of milliseconds to pause (unsigned long)
  • 17. Blink code example Hardware Required - Arduino Board - LED - resistor less than 1kohm
  • 18. Blink code example  void setup() { // initialize digital pin 13 as an output. pinMode(13, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(13, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
  • 21. Arduino libraries  Libraries are a collection of code that makes it easy for you to connect to a sensor, display, module, etc. For example, the built- in LiquidCrystal library makes it easy to talk to character LCD displays. There are hundreds of additional libraries available on the Internet for download.