]> git.piffa.net Git - sketchbook_andrea/blobdiff - basic/buttons/button_presses_count_down_5/button_presses_count_down_5.ino
for
[sketchbook_andrea] / basic / buttons / button_presses_count_down_5 / button_presses_count_down_5.ino
index 7e43837c9777ee7b15c85647f2b5732516824f82..2a26de673542c3f83fc8c2147be81775fd13d5ca 100644 (file)
@@ -1,11 +1,16 @@
 /*
- *  Alternating switch
+ *  Contatore di input
+
+    Il programma rileva la pressione del bottone e
+    riduce un contatore ad ogni pressione,
+    passando dallo stato iniziale a un secondo stato finale
+    dopo 10 iterazioni.
  */
 
 int switchPin = 2;              // switch is connected to pin 2
 int val;                        // variable for reading the pin status
 int buttonState;                // variable to hold the last button state
-int buttonPresses = 10;          // Counter for the button
+int buttonPresses = 10;         // Counter for the button
 
 void setup() {
   pinMode(switchPin, INPUT_PULLUP);    // Set the switch pin as input