We test and improve
Section 8: The project: the city's smart gateLesson 8.3 · ⏱ 10 min
- Add a red LED that lights when the gate is closed.
- Show “Welcome!” on the LCD screen when the gate opens.
- 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.


Test yourself
🎯 Challenge yourself
Easy
Improvement: the buzzer plays two notes as a welcome.
👀 Show the solution🙈 Hide the solution


Result: a two-note welcome.
Medium
Improvement: the door opens in two stages (45, then 90).
👀 Show the solution🙈 Hide the solution


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🙈 Hide the solution


Result: the green blinks slowly.

