Course Curriculum

Make the LED fade on and off

In Lecture 4, we created a simple circuit in which an LED blinks on and off. The Arduino sketch that drove the circuit simply wrote a HIGH or LOW value to the digital output pin 9, and the LED was turn on or off accordingly.

What we want to do in this lecture, is to make the LED not blink but fade on and off. We will be keeping the exact same circuit, and we'll only change the sketch to make this happen.


* An LED.

* A 220Ohm resistor.

View external resources


Did you find a problem with the school web site? Please use this form to report it (the form contains specific questions to help us fix the problem quickly).