diff --git a/build/shared/examples/01.Basics/Fade/Fade.ino b/build/shared/examples/01.Basics/Fade/Fade.ino index 6c70c91a43c..acd5f5b6d39 100644 --- a/build/shared/examples/01.Basics/Fade/Fade.ino +++ b/build/shared/examples/01.Basics/Fade/Fade.ino @@ -27,7 +27,7 @@ void loop() { brightness = brightness + fadeAmount; // reverse the direction of the fading at the ends of the fade: - if (brightness == 0 || brightness == 255) { + if (brightness <= 0 || brightness >= 255) { fadeAmount = -fadeAmount ; } // wait for 30 milliseconds to see the dimming effect