Blinking: delay
Section 1: The start: the ArduinoLesson 1.4 · ⏱ 7 min
delay makes the Arduino wait. The time is in milliseconds: 1000 = one second, and 500 = half a second.

🖥️ What happens on the stage?
The LED is on for half a second and off for half a second, and it repeats forever because it is inside loop.
📌 Note
This is the most famous Arduino program in the world, called Blink.
📌 Another example: fast blinking
Waiting 200 instead of 500: the LED blinks faster.


✍️ Practise
Make the LED blink.
✍️ Practise here in the lesson✖ Close the labor open the lab in a new page ↗
✍️ Practise
Practice: slow blinking, a whole second.
✍️ Practise here in the lesson✖ Close the labor open the lab in a new page ↗
🎯 Challenge yourself
Easy
Very slow blinking: a second and a half (1500).
👀 Show the solution🙈 Hide the solution


Result: it blinks slowly.
Medium
A heartbeat: on for 200 and off for 1000.
👀 Show the solution🙈 Hide the solution


Result: short flashes with long rests between them.
Hard
It blinks 3 times at start, then stays on.
👀 Show the solution🙈 Hide the solution


Result: after 3 blinks it stays on.

