| 1 | /* |
| 2 | * Blink |
| 3 | * |
| 4 | * The basic Arduino example. Turns on an LED on for one second, |
| 5 | * then off for one second, and so on... We use pin 13 because, |
| 6 | * depending on your Arduino board, it has either a built-in LED |
| 7 | * or a built-in resistor so that you need only an LED. |
| 8 | * |
| 9 | * http://www.arduino.cc/en/Tutorial/Blink |
| 10 | */ |
| 11 | |
| 12 | int Pin = 13; // LED connected to digital pin 13 |
| 13 | int |
| 14 | |
| 15 | void setup() // run once, when the sketch starts |
| 16 | { |
| 17 | pinMode(Pin, OUTPUT); // sets the digital pin as output |
| 18 | } |
| 19 | |
| 20 | void loop() // run over and over again |
| 21 | { |
| 22 | delay(1); |
| 23 | digitalWrite(Pin, HIGH); // sets the LED onv |
| 24 | digitalWrite(Pin, LOW); // sets the LED offv |
| 25 | } |