From 33778af0db0534541e76ea1e91270ab0a559133a Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 25 Jun 2012 19:15:49 +0200 Subject: [PATCH] Fixed 02.Digital/StateChangeDetection buoncing issue --- .../02.Digital/StateChangeDetection/StateChangeDetection.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino index 30bb3c405..cb39e9dbb 100644 --- a/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino +++ b/build/shared/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino @@ -64,6 +64,8 @@ void loop() { // wend from on to off: Serial.println("off"); } + // Delay a little bit to avoid bouncing + delay(50); } // save the current state as the last state, //for next time through the loop