2 Debug con macro per il preprocessore
6 Accensione e spegnimanto di un LED utilizzando variabili
7 per impostare la velocita' del lampeggio.
9 Turns on an LED on for one second, then off for one second, repeatedly.
11 This example code is in the public domain.
14 // Pin 13 has an LED connected on most Arduino boards.
17 int breve = 200; // Variabile richiambile nel corso dell'esecuzione
22 #define DEBUG_PRINT(x) Serial.print (x)
23 #define DEBUG_PRINTDEC(x) Serial.print (x, DEC)
24 #define DEBUG_PRINTLN(x) Serial.println (x)
26 #define DEBUG_PRINT(x)
27 #define DEBUG_PRINTDEC(x)
28 #define DEBUG_PRINTLN(x)
31 // the setup routine runs once when you press reset:
33 // initialize the digital pin as an output.
38 // the loop routine runs over and over again forever:
40 digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
41 DEBUG_PRINTLN("Stato HIGHT");
42 delay(breve); // wait for a second
43 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
44 DEBUG_PRINTLN("Stato LOW");
45 delay(breve); // wait for a second