انتقل للمحتوى
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

Turn on the LED

Section 1: The start: the ArduinoLesson 1.3 · ⏱ 6 min

The LED is connected to pin 13. The digitalWrite command makes the pin HIGH (5 volts, so the LED lights up) or LOW (zero, so it goes off).

🧩 Turn on the LED
Blocks: loop — repeats forever
🖥️ What happens on the stage?
The LED on pin 13 lights up and stays on.

📌 Another example: the green LED

The green LED is on pin 12.

🧩 The green LED
Blocks: loop — repeats forever
The green LED is on
The green LED is on
✍️ Practise
Turn on the LED.
✍️ Practise here in the lessonor open the lab in a new page ↗
✍️ Practise
Practice: turn on the green LED on pin 12.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Turn on the red LED on pin 13.

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

Result: the red LED is on.

Medium

Two LEDs: turn on the red (13) and the green (12) together.

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

Result: they light up together.

Hard

Turn on only the green, and set the red to LOW clearly.

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

Result: only the green.

Finished the lesson? Mark it so your progress counts.