Alright! You really are mastering Blink. This is a really big deal - and to show you how powerful you have become we're going to have you try these exercises to explore software and hardware:

Exercise 1.

Modify the code so that the light is on for 100 milliseconds and off for 900 milliseconds. This makes for a nice once-per-second second timer.

Exercise 2.

Modify the code so that the light is on for 50 milliseconds and off for 50 milliseconds. What happens?
Intense strobe action!

Exercise 3.

Modify the code so that the light is on for 10 ms (the shorthand for milliseconds) and off for 10 ms. What happens?
The light is no longer blinking

Now pick up the Arduino and gently wave it back and forth, in a dark room. What happens?
The LED creates a dashed trail of light in the air.

What do you think is happening here?
The LED is blinking, but its blinking so fast that our eyes can't pick it up, so it looks like a blur. When the Arduino is waved in the air, we see streaks of light from the blinks.

Like I said earlier, the Arduino can be really fast - faster than you can blink or your eyes can see!

This guide was first published on Sep 02, 2016. It was last updated on Sep 02, 2016.

This page (Exercises!) was last updated on Apr 17, 2021.

Text editor powered by tinymce.