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)

Arduino : how to get started
Arduino : how to get startedArduino : how to get started
Arduino : how to get started
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
Ardui no
Ardui no Ardui no
Ardui no
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
Python Programming for Arduino
Python Programming for ArduinoPython Programming for Arduino
Python Programming for Arduino
 
Arduino presentation by_warishusain
Arduino presentation by_warishusainArduino presentation by_warishusain
Arduino presentation by_warishusain
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Arduino IDE
Arduino IDE Arduino IDE
Arduino IDE
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Arduino IDE
Arduino IDEArduino IDE
Arduino IDE
 
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
Presentation arduino
Presentation arduinoPresentation arduino
Presentation arduino
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 

Viewers also liked

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

Viewers also liked (20)

Fablogiapresent
FablogiapresentFablogiapresent
Fablogiapresent
 
Waht is Arduino
Waht is ArduinoWaht is Arduino
Waht is Arduino
 
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 - إبتكار نموذج العمل التجاري
 

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
 
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
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 

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

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Recently uploaded (20)

Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

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.