Recall & Review
beginner
What is an ultrasonic DistanceSensor used for in Raspberry Pi projects?
An ultrasonic DistanceSensor measures the distance to an object by sending sound waves and calculating the time it takes for the echo to return.
Click to reveal answer
beginner
Which two pins are essential for connecting an ultrasonic DistanceSensor to a Raspberry Pi?
The Trigger pin (to send the sound pulse) and the Echo pin (to receive the reflected pulse) are essential for connection.
Click to reveal answer
intermediate
How do you calculate distance from the time measured by the ultrasonic sensor?
Distance (cm) = (Time (seconds) × Speed of sound (34300 cm/s)) ÷ 2. The division by 2 accounts for the sound traveling to the object and back.
Click to reveal answer
beginner
Why do we need to set the Trigger pin HIGH for 10 microseconds in the ultrasonic sensor code?
Setting the Trigger pin HIGH for 10 microseconds sends a short ultrasonic pulse to start the distance measurement.
Click to reveal answer
beginner
What Python library is commonly used to control GPIO pins on a Raspberry Pi for ultrasonic sensors?
The RPi.GPIO library is commonly used to control GPIO pins for sensors like the ultrasonic DistanceSensor.
Click to reveal answer
What does the Echo pin on an ultrasonic DistanceSensor do?
✗ Incorrect
The Echo pin receives the reflected sound wave to measure the time it took to bounce back.
Why do we divide the time by 2 when calculating distance with an ultrasonic sensor?
✗ Incorrect
The sound wave travels to the object and back, so dividing by 2 gives the one-way distance.
Which speed value is used for sound in air when calculating distance?
✗ Incorrect
The speed of sound in air is approximately 34300 cm/s, used for distance calculations.
How long should the Trigger pin be set HIGH to send a pulse?
✗ Incorrect
A 10 microsecond HIGH pulse triggers the ultrasonic sensor to send a sound wave.
Which Python library helps control Raspberry Pi GPIO pins?
✗ Incorrect
RPi.GPIO is the standard library for controlling GPIO pins on Raspberry Pi.
Explain how an ultrasonic DistanceSensor measures distance using Raspberry Pi.
Think about sending and receiving sound waves and timing.
You got /5 concepts.
Describe the steps to connect and program an ultrasonic DistanceSensor with Raspberry Pi.
Focus on hardware connection and code flow.
You got /5 concepts.