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