Arduino Lab 1.1
   LED Pattern - SOS
Pre-requisite
Arduino Lab 1.0
Same material, installation
Understanding of
-   setup,
-   loop,
-   output,
-   delay
-   ...
Setup
Define Pin 13 as LED
Set it as Output
Use a variable I
#define LED 13
int I;
void setup()
{
  pinMode(LED,OUTPUT);
}
Loop
Blink led for 3 times. Each blink is for
100 msec
Blink led for 3 times. Each blink is for
300 msec now.
Remain in lo...
Loop
void loop()
{
  for(I=0;I<3;++I)
  {
    digitalWrite(LED,HIGH);
    delay(100);
    digitalWrite(LED,LOW);
  delay(1...
Logic
Well, part of the program is same as
first except that it is executed only for
3 times
and then it moves to next step...
Query

You hear Morse code for SMS almost
every day for last so many years.
Guess where?
Contact Me
Have more ideas, queries, suggestions?
Contact me at -
Vinay Chaddha
email : vinay@joy-n-freedom.com
SMS : 9811...
Upcoming SlideShare
Loading in …5
×

Arduino Lab 1 1

1,608
-1

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,608
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Arduino Lab 1 1

  1. 1. Arduino Lab 1.1 LED Pattern - SOS
  2. 2. Pre-requisite Arduino Lab 1.0 Same material, installation Understanding of - setup, - loop, - output, - delay - digitalWrite,pinMode - High, Low
  3. 3. Setup Define Pin 13 as LED Set it as Output Use a variable I #define LED 13 int I; void setup() { pinMode(LED,OUTPUT); }
  4. 4. Loop Blink led for 3 times. Each blink is for 100 msec Blink led for 3 times. Each blink is for 300 msec now. Remain in loop This is SOS dot-dot-dot-dash-dash-dash-dot-dot-dot......
  5. 5. Loop void loop() { for(I=0;I<3;++I) { digitalWrite(LED,HIGH); delay(100); digitalWrite(LED,LOW); delay(100); } for(I=0;I<3;++I) { digitalWrite(LED,HIGH); delay(500); digitalWrite(LED,LOW); delay(500); } }
  6. 6. Logic Well, part of the program is same as first except that it is executed only for 3 times and then it moves to next step which is same except that delay is more and again repeated for three times And then back to previous step Result is morse code for SOS
  7. 7. Query You hear Morse code for SMS almost every day for last so many years. Guess where?
  8. 8. Contact Me Have more ideas, queries, suggestions? Contact me at - Vinay Chaddha email : vinay@joy-n-freedom.com SMS : 9811074026
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×