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

We test and improve

Section 8: The project: the city's smart gateLesson 8.3 · ⏱ 10 min
  1. Add a red LED that lights when the gate is closed.
  2. Show “Welcome!” on the LCD screen when the gate opens.
  3. Count the visitors with a variable, and print it on the Serial.
📌 Note
🎉 You finished the Robo Maker course! Try the lab's “code” mode to see the same program in C++, the language engineers use to write for the Arduino.

📌 Another example: a test: nobody at the gate

We test the first case: no movement, so the door is closed, the green is off and the buzzer is silent.

🧩 A test: nobody at the gate
Blocks: loop — repeats forever
Everything is calm
Everything is calm

Test yourself

1. Which part detects the visitor?
2. Which part opens the gate?

🎯 Challenge yourself

Easy

Improvement: the buzzer plays two notes as a welcome.

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

Result: a two-note welcome.

Medium

Improvement: the door opens in two stages (45, then 90).

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

Result: it opens gently.

Hard

Improvement: at night (no movement) the green blinks slowly so you can see where the gate is.

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

Result: the green blinks slowly.

Finished the lesson? Mark it so your progress counts.