Main Content
readDistance
Distance to object in front of ultrasonic sensor
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
measures the distance from the ultrasonic sensor to an object and returns the
measured distance in meters. The function uses 344 m/s for the velocity of
sound.distance
= readDistance(ultrasonicObj
)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2019a