Main Content

声波传感器

To connect from the MATLAB software to the EV3 Ultrasonic Sensor (item number 45504) use thesonicSensorfunction to create asonicSensorobject.

To measure the distance from the sensor to the nearest object, use thereadDistancefunction with thetouchSensorobject. The sensor uses ultrasonic sonar to measure the distance to the nearest object, and returns the measurement value in meters.

See Also