🚦 What Is an Event?
In the world of programming, an event is something that happens — and the robot reacts to it.
Think of it like this:
-
🔘 You press a button → the robot starts moving
-
✋ Your hand comes close → the robot waves
-
⏰ 5 seconds pass → the robot beeps
These are all events. They trigger something to happen.
🧠 What Is Input?
Input is the information the robot receives from outside — like from a sensor, button, or timer.
🟢 Input: Button is pressed
🔴 Input: Light sensor detects darkness
🟡 Input: Timer says 10 seconds passed
🧃 Real-Life Examples
Event or Input |
Robot Action |
Button press |
Toy robot starts dancing |
Clapping sound |
Robot dog barks |
Timer runs out |
Smart light turns off |
Obstacle ahead |
Vacuum robot changes direction |