AbstractBeliefs

Untitled

Dec 27th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. /*
  2.   Blink
  3.   Turns on an LED on for one second, then off for one second, repeatedly.
  4.  
  5.   This example code is in the public domain.
  6.  */
  7. #include <util/delay.h>
  8. void setup() {                
  9.   // initialize the digital pin as an output.
  10.   // Pin 13 has an LED connected on most Arduino boards:
  11.   pinMode(13, OUTPUT);    
  12. }
  13.  
  14. void loop() {
  15.   digitalWrite(13, HIGH);   // set the LED on
  16.   _delay_ms(1000);              // wait for a second
  17.   digitalWrite(13, LOW);    // set the LED off
  18.   _delay_ms(1000);              // wait for a second
  19. }
Advertisement
Add Comment
Please, Sign In to add comment