Distancia#
Introducción#
The Distance Sensor can detect whether an object is in front of the sensor and report how far away that object is.
A continuación se muestra una lista de bloques disponibles:
Distance found an object — Reports whether the Distance Sensor currently detects an object.
object distance — Reports the distance between the Distance Sensor and the nearest detected object.
Distance found an object#
The Distance found an object Boolean block reports whether the Distance Sensor currently detects an object within 2000mm.
True — The Distance Sensor detects an object.
False — The Distance Sensor does not detect an object.
<[FrontDistance v] Encontraste un objeto?>
Parámetros |
Descripción |
|---|---|
sensor de distancia |
The Distance Sensor to use. Choose from the Distance Sensors available for the VR Robot. |
Ejemplo
cuando empezó :: hat events
[Spin until the Distance Sensor detects an object.]
turno [derecha v]
esperar hasta <[FrontDistance v] Encontraste un objeto?>
deja de conducir
distancia del objeto#
The object distance reporter block reports the distance between the Distance Sensor and the nearest detected object.
([FrontDistance v] distancia en [mm v])
Parámetros |
Descripción |
|---|---|
sensor de distancia |
The Distance Sensor to use. Choose from the Distance Sensors available for the VR Robot. |
unidad |
The distance unit: mm or inches. |
Ejemplo
cuando empezó :: hat events
[Print the distance only after the Distance Sensor detects an object.]
turno [derecha v]
esperar hasta <[FrontDistance v] Encontraste un objeto?>
deja de conducir
imprimir ([FrontDistance v] distancia en [mm v]) ▶