Recall & Review
beginner
What is the role of a sensor in an alarm system?
The sensor detects changes in the environment, like motion or opening a door, and sends a signal to trigger the alarm.
Click to reveal answer
beginner
How does a buzzer work in an alarm system?
A buzzer produces a loud sound when it receives an electrical signal, alerting people to a possible problem.
Click to reveal answer
beginner
In Arduino code, which function is used to read the sensor input?
The function
digitalRead(pin) is used to read the sensor's digital signal from the specified pin.Click to reveal answer
beginner
Why do we use
pinMode(pin, INPUT) for the sensor pin in Arduino?We set the sensor pin as INPUT so Arduino knows it should listen for signals coming from the sensor.
Click to reveal answer
beginner
What is the purpose of
pinMode(pin, OUTPUT) for the buzzer pin?Setting the buzzer pin as OUTPUT allows Arduino to send signals to turn the buzzer on or off.
Click to reveal answer
Which Arduino function turns the buzzer ON?
✗ Incorrect
To turn the buzzer ON, we send a HIGH signal using digitalWrite.
What does the sensor output when it detects motion?
✗ Incorrect
Most motion sensors output a HIGH signal when motion is detected.
Which pin mode should be set for a sensor input?
✗ Incorrect
Sensors are inputs, so the pin mode should be INPUT.
What happens if you set the buzzer pin as INPUT instead of OUTPUT?
✗ Incorrect
If the buzzer pin is INPUT, Arduino cannot send signals to turn it on.
Which Arduino function reads a digital sensor value?
✗ Incorrect
digitalRead() reads the digital value from a sensor pin.
Explain how an Arduino alarm system uses a sensor and buzzer to alert when triggered.
Think about the flow from sensing to alerting.
You got /4 concepts.
Describe the Arduino code setup needed for an alarm system with a sensor and buzzer.
Focus on pin setup and main loop actions.
You got /4 concepts.
