// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
-int ledA = 13; //Primo LED
-int ledB = 12; //Secondo LED, con resistenza
+const int ledA = 13; //Primo LED
+const int ledB = 12; //Secondo LED, con resistenza
// the setup routine runs once when you press reset:
void setup() {
// the loop routine runs over and over again forever:
void loop() {
+ // Primo periodo
digitalWrite(ledA, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(ledB, HIGH);
-
delay(500); // Minimo comun denominatore del periodo
+
+ // Secondo periodo
//digitalWrite(ledA, HIGH); // ledA non cambia
digitalWrite(ledB, LOW);
-
-
delay(500);
+
+ // Terzo periodo
digitalWrite(ledA, LOW);
digitalWrite(ledB, HIGH);
+ delay(500);
- delay(500);
+ // Quarto periodo
//digitalWrite(ledA, LOW);
digitalWrite(ledB, LOW);
-
-
delay(500);
- digitalWrite(ledA, LOW);
- digitalWrite(ledB, LOW);
- ;
}
/* Domande
+