انتقل للمحتوى
Robo EgyptRobo Egypt
☰ Course contents
Robo Maker: home
0. Lab tour1
1. The start: the Arduino6
2. Wiring and the traffic light4
3. Inputs: the button4
4. Sound and movement5
5. Sensors and numbers5
6. Distance, the screen and colours5
7. Motors and the car4
8. The project: the city's smart gate3
9. From blocks to C++ code5
10. Sensors and screens in code5
11. Smart systems5
12. Bluetooth: control from the phone1

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.

🧩 A blinking LED
Blocks: loop — repeats forever
🖥️ 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.

🧩 Fast blinking
Blocks: loop — repeats forever
Fast blinking
Fast blinking
✍️ Practise
Make the LED blink.
✍️ Practise here in the lessonor open the lab in a new page ↗
✍️ Practise
Practice: slow blinking, a whole second.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Very slow blinking: a second and a half (1500).

👀 Show the solution
🧩 Solution
Blocks: loop — repeats forever
In the lab
In the lab

Result: it blinks slowly.

Medium

A heartbeat: on for 200 and off for 1000.

👀 Show the solution
🧩 Solution
Blocks: loop — repeats forever
In the lab
In the lab

Result: short flashes with long rests between them.

Hard

It blinks 3 times at start, then stays on.

👀 Show the solution
🧩 Solution
Blocks: setup — runs once
In the lab
In the lab

Result: after 3 blinks it stays on.

Finished the lesson? Mark it so your progress counts.