0
0
Raspberry Piprogramming~5 mins

DistanceSensor (ultrasonic) in Raspberry Pi - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AReceives the reflected sound wave
BSends the initial sound pulse
CPowers the sensor
DMeasures temperature
Why do we divide the time by 2 when calculating distance with an ultrasonic sensor?
ATo adjust for sensor delay
BTo convert seconds to microseconds
CBecause the sound travels to the object and back
DTo calibrate the sensor
Which speed value is used for sound in air when calculating distance?
A300000000 m/s
B34300 cm/s
C1500 m/s
D1000 cm/s
How long should the Trigger pin be set HIGH to send a pulse?
A100 milliseconds
B1 second
C5 seconds
D10 microseconds
Which Python library helps control Raspberry Pi GPIO pins?
ARPi.GPIO
BNumPy
CPandas
DMatplotlib
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.