Parachoques#
Introducción#
The Bumper Switch is a mechanical switch that completes a circuit when pressed, allowing the robot to detect presses and releases.

A continuación se muestra una lista de bloques disponibles:
Bumper Switch pressed – Reports a Boolean indicating if the Bumper Switch is being pressed.
when Bumper Switch – Runs the attached stack of blocks when the Bumper Switch is pressed or released.
¿Interruptor de parachoques presionado?#
The Bumper Switch pressed Boolean block reports whether or not a Bumper Switch is being pressed. This can be used to check if the robot bumps into other objects.
True — The Bumper Switch is being pressed.
False — The Bumper Switch is not being pressed
<[BumperA v] presionado?>
Parámetro |
Descripción |
|---|---|
dispositivo |
Qué interruptor de parachoques utilizar, configurado en la ventana Dispositivos. |
cuando empezó
[Display a message when the Bumper Switch is pressed.]
esperar hasta <[BumperA v] presionado?>
imprimir [Bumper Switch pressed!] en la pantalla ▶
Cuando el interruptor de parachoques#
The when Bumper Switch hat block runs the attached stack of blocks when the selected Bumper Switch is pressed or released.
cuando [BumperA v] [presionado v] :: hat events
Parámetro |
Descripción |
|---|---|
dispositivo |
Qué interruptor de parachoques utilizar, configurado en la ventana Dispositivos. |
estado |
When the attached stack of blocks will run: pressed will run when the Bumper Switch is pressed down, and released runs when the Bumper Switch is released. |
cuando [BumperA v] [presionado v] :: hat events
[Display a message when the Bumper Switch is pressed.]
imprimir [Bumper Switch pressed!] en la pantalla ▶