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

The RGB LED

Section 6: Distance, the screen and coloursLesson 6.3 · ⏱ 6 min

An RGB LED has three small LEDs inside: red, green and blue. Mixing them makes many colours: red + green = yellow.

🧩 Three colours
Blocks: loop — repeats forever

📌 Another example: three colours in order

Red, then green, then blue, a second for each colour.

🧩 Three colours in order
Blocks: loop — repeats forever
Red
Red
Green
Green
Blue
Blue
✍️ Practise
Show 3 colours.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Make the LED purple.

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

Result: purple.

Medium

A traffic light with one LED: green, yellow, red.

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

Result: three colours in order.

Hard

A rainbow: seven colours, half a second for each colour.

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

Result: the colours change.

Finished the lesson? Mark it so your progress counts.