Ultrasonic Sensor
R2026bRepresent connected Ultrasonic sensor and measure distance to object
Libraries:
Simulink Coder Support Package for VEX EDR V5 Robot Brain /
Sensors
Description
Add-On Required: This feature requires the Simulink Coder Support Package for VEX EDR V5 Robot Brain add-on.
The Ultrasonic Sensor block represents an Ultrasonic Sensor that is connected to the 3-wire ports of VEX EDR V5 Robot Brain, and measure the distance to the object in the path of the robot. The block enables the object detection when the object is in the range of 3 to 300 centimeters (cm) from the sensor. The block outputs a value 0 for an object that is farther than 300 cm.
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"vexv5lib/Sensors/Ultrasonic Sensor"
Example: add_block("vexv5lib/Sensors/Ultrasonic Sensor","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2019b
