Advertisement
prasanth_ntu

1a The Blinking LED

Feb 22nd, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1. /*Experiment 1a - The Blinking LED
  2.   This program covers using delay to turn ON/OFF the LED in regular interval
  3.   Components Required
  4.    1 Arduino Board
  5.    1 LED
  6.    1 Resistor (220 ohm to 1K ohm)
  7. */
  8.  
  9.  
  10. void setup()   {                
  11.   pinMode(13, OUTPUT);       // Initialize Arduino Digital Pin 13 as output
  12. }
  13.  
  14.  
  15. void loop()                    
  16. {
  17.   digitalWrite(13, HIGH);   // Switch On LED
  18.   delay(1000);              // Wait for 1000 millisecond (or) second
  19.   digitalWrite(13, LOW);    // Switch Off LED
  20.   delay(1000);              // Wait for 1 second
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement