Lesson goal: Flash an LED on and off using an Arduino

Home

In the last lesson, you learned how to turn on LED on and off using digitalwrite, with a bit of set up from pinmode. In this lesson we will use a for-loop to flash an LED on and off. To control the flash rate, use the delay function.
delay(milliseconds)
Move the mouse over a dotted box for more information.

Now you try. Go for it! Try to flash an LED on and off 10 times!

Type your code here:


See your results here: