Torre de señales#
Introducción#
La Torre de Señalización es un dispositivo indicador que proporciona información visual sobre el estado mediante luces de colores e incluye un interruptor de parachoques incorporado para detectar la interacción física.
A continuación se muestra una lista de todos los métodos disponibles:
Configuradores: Configure los colores y patrones de las luces de la torre de señalización.
set_color– Sets the pattern for a single Signal Tower color band.set_colors– Sets the state of each Signal Tower light band.
Constructores: Inicialicen y configuren manualmente la torre de señales.
SignalTower– Create a Signal Tower.
Colocadores#
set_color#
set_color sets the light pattern of one or more color lights on the Signal Tower.
Usage:
signal_tower.set_color(value, state)
Parámetro |
Descripción |
|---|---|
valor |
Optional. The color light to control:
|
estado |
Optional. The light pattern to apply:
|
# Set the Signal Tower to start blinking the blue LED
signal_tower.set_color(SignalTower.BLUE, signal_tower.BLINK)
set_colors#
set_colors sets the state of each Signal Tower light band.
Usage:
signal_tower.set_colors(r, y, g, b, w)
Parámetro |
Descripción |
|---|---|
r |
The state for the red LED:
|
y |
The state for the yellow LED:
|
gramo |
The state for the green LED:
|
b |
The state for the blue LED:
|
w |
The state for the white LED:
|
# Turn on all LEDs
signal_tower.set_colors(SignalTower.ON, SignalTower.ON, SignalTower.ON, SignalTower.ON, SignalTower.ON)
# Turn on just the red LED
signal_tower.set_colors(SignalTower.ON, SignalTower.OFF, SignalTower.OFF, SignalTower.OFF, SignalTower.OFF)
Constructores#
SignalTower#
Se accede a SignalTower mediante el atributo arm.signaltower. No es necesario crear manualmente una instancia de SignalTower.
# Access the Signal Tower from the arm object
signal_tower = arm.signaltower