3 Now with 2 variables and an extra LED (remember a ~320 ohms resistor).
4 Turns on an LED on for one second, then off for one second, repeatedly.
6 This example code is in the public domain.
9 // Pin 13 has an LED connected on most Arduino boards.
16 // the setup routine runs once when you press reset:
18 // initialize the digital pin as an output.
23 // the loop routine runs over and over again forever:
32 void lightRed(int length) { // Argomento
33 digitalWrite(red, HIGH); // turn the LED on (HIGH is the voltage level)
34 delay(length); // wait for a second
35 digitalWrite(red, LOW); // turn the LED off by making the voltage LOW
39 void lightGreen(int length) {
40 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
41 delay(length); // wait for a second
42 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
43 delay(length); // wait for a second