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