SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
Arduino Lab 1.0
   Lab 1.0 - LED Blinking
Material Required
Arduino Board + RS232 Cable + Power
Supply
Or
Arduino Mega + USB Cable
Installed Arduino IDE on your computer
Working RS232 or USB port in your
computer
Setup
Arduino programming is like C.
It has t wo basic functions.
First is setup - this has all commands
that are executed only once.
   void setup (void)
   {
      ;
   }
Loop
Second function is loop - This has
commands executed in a continius loop.
void loop (void)
   {
       ;
   }
Predefined Commands
There are few predefined commands
First command is pinMode. This sets the
function of pin as input or output.
Usually this is done in setup function
   void setup (void)
   {
      pinMode (13,OUTPUT);
   }
Predefined Commands
Another is digitalWrite.
This write HIGH or LOW on pins defined as
OUTPUT.
This can be executed in setup or loop
function
void loop (void)
{
   digitalWrite (13,HIGH);
}
Predefined Command
Another command is delay.
This provide delay in msecs.
void loop (void)
  {
    digitalWrite (13,HIGH);
    delay(500);
    digitalWrite (13,LOW);
    delay(500);
  }
First Program
#define LED 13
void setup (void)
{
   pinMode (LED,OUTPUT);
}
void loop (void)
{
   digitalWrite (LED,HIGH);
   delay(200);
   digitalWrite (LED,LOW);
   delay(200);
}
Verify-Upload
Click on VERIFY (Sketch | Verify)
Click on UPLOAD (File | Upload)
Wait - it will start running, LED will
start blinking after few seconds.
Change the delay, verify and upload
again. See the difference on blinking
time and speed.
Next Level Program
Modify the program so that with single
LED you create morse code of SOS.
Send me an email giving your
experience, total time spent and
problems faced in the process.
This is first part of training. You will be
getting next level of training soon.
Contact Me
Have more ideas, queries, suggestions?
Contact me at -
Vinay Chaddha
email : vinay@open-embedded.info
SMS : 9811074026
know more about me at visualcv.com/
gvc3065
Check us online

Join our facebook page at
facebook.com/open.embedded
Buy products from myworld.ebay.in/
open.embedded

Más contenido relacionado

Similar a Arduino lab 1_0

Lab 2_ Programming an Arduino.pdf
Lab 2_ Programming an Arduino.pdfLab 2_ Programming an Arduino.pdf
Lab 2_ Programming an Arduino.pdfssuser0e9cc4
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshopmayur1432
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduinoBetsy Eng
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdfJayanthi Kannan MK
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5Syed Mustafa
 
Arduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesArduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesMithi Sevilla
 
The IoT Academy IoT training Arduino Part 2 Arduino IDE
The IoT Academy IoT training Arduino Part 2 Arduino IDEThe IoT Academy IoT training Arduino Part 2 Arduino IDE
The IoT Academy IoT training Arduino Part 2 Arduino IDEThe IOT Academy
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerMujahid Hussain
 
Arduino: Analog I/O
Arduino: Analog I/OArduino: Analog I/O
Arduino: Analog I/OJune-Hao Hou
 
Arduino programming
Arduino programmingArduino programming
Arduino programmingSiji Sunny
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.pptZainIslam20
 
ARUDINO UNO and RasberryPi with Python
 ARUDINO UNO and RasberryPi with Python ARUDINO UNO and RasberryPi with Python
ARUDINO UNO and RasberryPi with PythonJayanthi Kannan MK
 
Blinking a Single LED
Blinking a Single LEDBlinking a Single LED
Blinking a Single LEDRihab Rahman
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduinoavikdhupar
 

Similar a Arduino lab 1_0 (20)

Lab 2_ Programming an Arduino.pdf
Lab 2_ Programming an Arduino.pdfLab 2_ Programming an Arduino.pdf
Lab 2_ Programming an Arduino.pdf
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Syed IoT - module 5
Syed  IoT - module 5Syed  IoT - module 5
Syed IoT - module 5
 
Arduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesArduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch Slides
 
P-Space Arduino/Genuino day 2016
P-Space Arduino/Genuino day 2016P-Space Arduino/Genuino day 2016
P-Space Arduino/Genuino day 2016
 
The IoT Academy IoT training Arduino Part 2 Arduino IDE
The IoT Academy IoT training Arduino Part 2 Arduino IDEThe IoT Academy IoT training Arduino Part 2 Arduino IDE
The IoT Academy IoT training Arduino Part 2 Arduino IDE
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 
Arduino: Analog I/O
Arduino: Analog I/OArduino: Analog I/O
Arduino: Analog I/O
 
Led flash
Led flashLed flash
Led flash
 
arduinoedit.pptx
arduinoedit.pptxarduinoedit.pptx
arduinoedit.pptx
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
arduinoSimon.ppt
arduinoSimon.pptarduinoSimon.ppt
arduinoSimon.ppt
 
ARUDINO UNO and RasberryPi with Python
 ARUDINO UNO and RasberryPi with Python ARUDINO UNO and RasberryPi with Python
ARUDINO UNO and RasberryPi with Python
 
Blinking a Single LED
Blinking a Single LEDBlinking a Single LED
Blinking a Single LED
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 

Más de Open.Embedded

Micro controller what_and_how_to_learn
Micro controller what_and_how_to_learnMicro controller what_and_how_to_learn
Micro controller what_and_how_to_learnOpen.Embedded
 
Arduino + On Screen Display
Arduino + On Screen Display Arduino + On Screen Display
Arduino + On Screen Display Open.Embedded
 
Arduino Labs Introduction
Arduino Labs IntroductionArduino Labs Introduction
Arduino Labs IntroductionOpen.Embedded
 
Learn arduino hardware
Learn arduino hardwareLearn arduino hardware
Learn arduino hardwareOpen.Embedded
 
Who what and by whom
Who what and by whomWho what and by whom
Who what and by whomOpen.Embedded
 

Más de Open.Embedded (11)

ARM in 30 minutes
ARM in 30 minutes ARM in 30 minutes
ARM in 30 minutes
 
Micro controller what_and_how_to_learn
Micro controller what_and_how_to_learnMicro controller what_and_how_to_learn
Micro controller what_and_how_to_learn
 
Start with arduino
Start with arduinoStart with arduino
Start with arduino
 
Joy-n-Freedom
Joy-n-FreedomJoy-n-Freedom
Joy-n-Freedom
 
About vinay chaddha
About vinay chaddhaAbout vinay chaddha
About vinay chaddha
 
Arduino + On Screen Display
Arduino + On Screen Display Arduino + On Screen Display
Arduino + On Screen Display
 
Arduino lab 1_1
Arduino lab 1_1Arduino lab 1_1
Arduino lab 1_1
 
Arduino Labs Introduction
Arduino Labs IntroductionArduino Labs Introduction
Arduino Labs Introduction
 
Open.embedded intro
Open.embedded introOpen.embedded intro
Open.embedded intro
 
Learn arduino hardware
Learn arduino hardwareLearn arduino hardware
Learn arduino hardware
 
Who what and by whom
Who what and by whomWho what and by whom
Who what and by whom
 

Último

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
 
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
 
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
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfAmitRout25
 
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...JeylaisaManabat1
 
ingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet saucesingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet saucesJessicaEscao
 
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
 
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
 
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
 

Último (9)

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
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi
 
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
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdf
 
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
 
ingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet saucesingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet sauces
 
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
 
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?
 
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)
 

Arduino lab 1_0

  • 1. Arduino Lab 1.0 Lab 1.0 - LED Blinking
  • 2. Material Required Arduino Board + RS232 Cable + Power Supply Or Arduino Mega + USB Cable Installed Arduino IDE on your computer Working RS232 or USB port in your computer
  • 3. Setup Arduino programming is like C. It has t wo basic functions. First is setup - this has all commands that are executed only once. void setup (void) { ; }
  • 4. Loop Second function is loop - This has commands executed in a continius loop. void loop (void) { ; }
  • 5. Predefined Commands There are few predefined commands First command is pinMode. This sets the function of pin as input or output. Usually this is done in setup function void setup (void) { pinMode (13,OUTPUT); }
  • 6. Predefined Commands Another is digitalWrite. This write HIGH or LOW on pins defined as OUTPUT. This can be executed in setup or loop function void loop (void) { digitalWrite (13,HIGH); }
  • 7. Predefined Command Another command is delay. This provide delay in msecs. void loop (void) { digitalWrite (13,HIGH); delay(500); digitalWrite (13,LOW); delay(500); }
  • 8. First Program #define LED 13 void setup (void) { pinMode (LED,OUTPUT); } void loop (void) { digitalWrite (LED,HIGH); delay(200); digitalWrite (LED,LOW); delay(200); }
  • 9. Verify-Upload Click on VERIFY (Sketch | Verify) Click on UPLOAD (File | Upload) Wait - it will start running, LED will start blinking after few seconds. Change the delay, verify and upload again. See the difference on blinking time and speed.
  • 10. Next Level Program Modify the program so that with single LED you create morse code of SOS. Send me an email giving your experience, total time spent and problems faced in the process. This is first part of training. You will be getting next level of training soon.
  • 11. Contact Me Have more ideas, queries, suggestions? Contact me at - Vinay Chaddha email : vinay@open-embedded.info SMS : 9811074026 know more about me at visualcv.com/ gvc3065
  • 12. Check us online Join our facebook page at facebook.com/open.embedded Buy products from myworld.ebay.in/ open.embedded