Rev Author Line No. Line
2934 jacho 1 /**
2 * Blink the Wiring board LED
3 * by BARRAGAN http://barraganstudio.com
4 *
5 * turns on and off the Wiring board LED, with
6 * intervals of 1 second (1000 milliseconds).
7 * For the Wiring boards v1 the on-board LED is on pin 48,
8 * on Wiring S the on-board LED is on pin 15.
9 * it is also possible to use the WLED constant with the
10 * digitalWrite command: digitalWrite(WLED, HIGH). WLED will be the
11 * correct pin in the current board selected in the
12 * Tools -> Board menu.
13 */
14  
15 // blinks the board LED, use 48 for Wiring 1.0 boards, use pin 15
16 // for Wiring S
17  
18 void setup()
19 {
20 pinMode(2, OUTPUT); // set pin as output
21 }
22  
23 void loop()
24 {
25 digitalWrite(2, HIGH); // set the LED on
26 delay(1000); // wait for a second
27 digitalWrite(2, LOW); // set the LED off
28 delay(1000); // wait for a second
3758 kaklik 29 }