int led = 13;
int breve = 200; // Variabile richiambile nel corso dell'esecuzione
int lunga = 1000;
-int iterator = 0; // Defniamo un variabile per controllare un ciclo iterativo
// the setup routine runs once when you press reset:
void setup() {
// the loop routine runs over and over again forever:
void loop() {
+ int iterator = 0; // Defniamo un variabile per controllare un ciclo iterativo
while (iterator <10) {
rapido(); // accende e spegne rapidamente il LED
- iterator = iterator +1 ; // incrementa l'iteratore
+ iterator = iterator + 1 ; // incrementa l'iteratore
// iterator++ ; // equivalente
}
lento(); // accende e spegne lentamente il LED
- // Domanda: a quanto equivale iterator ora?
}
// Funzioni create dall'utente:
+