]> git.piffa.net Git - sketchbook_andrea/blobdiff - basic/buttons/button_state_3/button_state_3.ino
PWM: errata and states
[sketchbook_andrea] / basic / buttons / button_state_3 / button_state_3.ino
index c008ff182246fef81fa9b36f26642d5e46f0842b..83b274f17b45fd68deedde388f5cefba211482cb 100644 (file)
@@ -19,7 +19,7 @@ void setup() {
 
 void loop(){
   statoAttuale = digitalRead(switchPin);      // Legge lo stato del bottone e lo resistra in val
-  // delay(20)                                // riduce l'effetto bounce
+   delay(20)                                // riduce l'effetto bounce
   if (statoAttuale != ultimoStato) {          // lo stato del bottone e' cambiato
     if (statoAttuale == HIGH) {               // il bottone e' stato premuto
       Serial.println("Bottone premuto");