Blink.cpp

00001 /*
00002  * Blink
00003  *
00004  * The basic Arduino example.  Turns on an LED on for one second,
00005  * then off for one second, and so on...  We use pin 13 because,
00006  * depending on your Arduino board, it has either a built-in LED
00007  * or a built-in resistor so that you need only an LED.
00008  *
00009  * http://www.arduino.cc/en/Tutorial/Blink
00010  */
00011 
00012 #include <WProgram.h>
00013 
00014 int ledPin = 13;                // LED connected to digital pin 13
00015 
00016 void setup()                    // run once, when the sketch starts
00017 {
00018   pinMode(ledPin, OUTPUT);      // sets the digital pin as output
00019 }
00020 
00021 void loop()                     // run over and over again
00022 {
00023   digitalWrite(ledPin, HIGH);   // sets the LED on
00024   delay(1000);                  // waits for a second
00025   digitalWrite(ledPin, LOW);    // sets the LED off
00026   delay(1000);                  // waits for a second
00027 }
00028 
00029 int main()
00030 {
00031   init();
00032   setup();
00033 
00034   for(;;)
00035     loop();
00036 
00037   return 0;
00038 }
00039 
00040 
Generated on Sun May 8 08:41:31 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3