7 Accensione e spegnimanto di un LED utilizzando funzioni
8 per comandare il lampeggio.
10 This example code is in the public domain.
13 // Dichiarazione variabili
15 // Pin 13 has an LED connected on most Arduino boards.
18 int breve = 200; // Variabile richiambile nel corso dell'esecuzione
24 // initialize the digital pin as an output.
31 rapido(); // accende e spegne rapidamente il LED
32 rapido(); // accende e spegne rapidamente il LED
33 lento(); // accende e spegne lentamente il LED
37 // Funzioni create dall'utente:
40 // Accende e spegne rapidamente il LED
42 // sequenze di istruzione: accendere e spegnere il LED
43 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
44 delay(breve); // wait for a second
45 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
46 delay(breve); // wait for a second
50 // Accende e spegne lentamente il LED
52 // sequenze di istruzione: accendere e spegnere il LED
53 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
54 delay(lunga); // wait for a second
55 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW