0PricingLogin
Arduino & IoT Academy · Lesson

Fade an LED Up and Down

Loop through values for a breathing-light effect.

From Steady to Breathing

One fixed value gives a steady glow. To make an LED fade, you simply keep changing the analogWrite value over time. 🌬️

The Plan: Count Up Slowly

To fade in, walk the brightness from 0 toward 255 in small steps, pausing briefly between each one so the change is visible.

All lessons in this course

  1. What PWM Actually Does
  2. analogWrite 0–255
  3. Fade an LED Up and Down
  4. Knob Controls LED Brightness
← Back to Arduino & IoT Academy