/*
- * 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