]> git.piffa.net Git - sketchbook_andrea/commitdiff
Numerati bliks
authorAndrea Manni <andrea@piffa.net>
Mon, 23 Feb 2015 16:05:22 +0000 (17:05 +0100)
committerAndrea Manni <andrea@piffa.net>
Mon, 23 Feb 2015 16:05:22 +0000 (17:05 +0100)
basic/blinks/blink_1_variabili/blink_1_variabili.ino
basic/blinks/blink_2_funzioni/blink_2_funzioni.ino
basic/blinks/blink_3_ciclo_while/blink_3_ciclo_while.ino
basic/blinks/blink_4_ciclo_for/blink_4_ciclo_for.ino
basic/blinks/blink_5_2_leds/blink_5_2_leds.ino
basic/blinks/blink_6_funzioni_argomenti/blink_6_funzioni_argomenti.ino

index a517b3d0c9572a85408edeb90b9cfaad814a5fb0..d828bc924450a452ea004772e145b8d9388c01f1 100644 (file)
@@ -1,6 +1,9 @@
 /*
 /*
-  Blink v3
-  Now with 2 variables and an extra LED (remember a ~320 ohms resistor).
+  Blink v1
+
+  Accensione e spegnimanto di un LED utilizzando variabili
+  per impostare la velocita' del lampeggio.
+  
   Turns on an LED on for one second, then off for one second, repeatedly.
  
   This example code is in the public domain.
   Turns on an LED on for one second, then off for one second, repeatedly.
  
   This example code is in the public domain.
index 0655130ab1df4048948d7f6f0f1c4e60db36186a..210de4df774abe477cfa4da510c5c3dc21033cca 100644 (file)
@@ -1,7 +1,8 @@
 /*
 /*
-  Blink v3
- Now with 2 variables and an extra LED (remember a ~320 ohms resistor).
- Turns on an LED on for one second, then off for one second, repeatedly.
+  Blink v2
+ Accensione e spegnimanto di un LED utilizzando funzioni
+ per comandare il lampeggio.
  
  This example code is in the public domain.
  */
  
  This example code is in the public domain.
  */
@@ -48,3 +49,4 @@ void lento() {
 }
 
 
 }
 
 
+
index 9fcbf8c65fb3180ddbe7a7cb1a065d82ec88dd86..ff8dea5eda33db47e4a173e3f4bf0cf60439de9f 100644 (file)
@@ -1,7 +1,7 @@
 /*
   Blink v3
 /*
   Blink v3
- Now with 2 variables and an extra LED (remember a ~320 ohms resistor).
Turns on an LED on for one second, then off for one second, repeatedly.
+ Accensione e spegnimanto di un LED utilizzando un ciclo
iterativo while per comandare il lampeggio.
  
  This example code is in the public domain.
  */
  
  This example code is in the public domain.
  */
@@ -22,9 +22,9 @@ void setup() {
 // the loop routine runs over and over again forever:
 void loop() {
   while (iterator <10) {
 // the loop routine runs over and over again forever:
 void loop() {
   while (iterator <10) {
-      rapido(); // accende e spegne rapidamente il LED
-      iterator = iterator +1 ; // incrementa l'iteratore
-      // iterator++ ; // equivalente
+    rapido(); // accende e spegne rapidamente il LED
+    iterator = iterator +1 ; // incrementa l'iteratore
+    // iterator++ ; // equivalente
   }
   lento();  // accende e spegne lentamente il LED
   // Domanda: a quanto equivale iterator ora?
   }
   lento();  // accende e spegne lentamente il LED
   // Domanda: a quanto equivale iterator ora?
@@ -53,3 +53,4 @@ void lento() {
 }
 
 
 }
 
 
+
index 99b91992bc457a643c1520f3012650d72be4d026..99a04191dc51b10d128c1ef632cabcf4e544a407 100644 (file)
@@ -1,7 +1,7 @@
 /*
 /*
-  Blink v3
- Now with 2 variables and an extra LED (remember a ~320 ohms resistor).
Turns on an LED on for one second, then off for one second, repeatedly.
+  Blink v4
+ Accensione e spegnimanto di un LED utilizzando un ciclo
iterativo for per comandare il lampeggio.
  
  This example code is in the public domain.
  */
  
  This example code is in the public domain.
  */
index db6fd3497d2937f326866da206ff10ed48fbe62f..299bcf04ad6d6acfd5ed7711820d7a49923159cc 100644 (file)
@@ -1,11 +1,18 @@
 /*
 /*
-  Blink v3
-  Now with 2 variables and an extra LED (remember a ~320 ohms resistor).
-  Turns on an LED on for one second, then off for one second, repeatedly.
+  Blink v5
  
  
-  This example code is in the public domain.
- */
+ Accensione e spegnimanto di 2 LED.
+ Nel circuito oltre al LED montato direttamente sul pin 13
+ viene aggiunto un altro LED pilotato dal PIN 12.
+ Ricordarsi di usare una resistenza da ~320ohms per il secondo LED.
+ Resistenza = (Voltaggio_Arduino - Forward_voltage_LED) / (ampere utilizzati)
+ R = (5v-1.8v) / 0.010a 
+ R =320ohms
  
  
+ This example code is in the public domain.
+ */
+
 // Pin 13 has an LED connected on most Arduino boards.
 // give it a name:
 int led = 13;
 // Pin 13 has an LED connected on most Arduino boards.
 // give it a name:
 int led = 13;
@@ -30,3 +37,5 @@ void loop() {
   digitalWrite(red, LOW);    // turn the LED off by making the voltage LOW
   delay(lunga); 
 }
   digitalWrite(red, LOW);    // turn the LED off by making the voltage LOW
   delay(lunga); 
 }
+
+
index e5c0f2f4a6ca57f4245e90cabc1d9301aa38c509..3d33586b52e7211ce46500e3de62dddc50d6bc2a 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-  Blink v7
+  Blink v6
   
  Due LEDs con funzioni che accettano argomenti:
  gli argomenti permettono di modificar il comportamento
   
  Due LEDs con funzioni che accettano argomenti:
  gli argomenti permettono di modificar il comportamento