Signal Tower#
Introduction#
The Signal Tower is an indicator device that provides visual status feedback using colored lights and includes a built-in bumper switch for detecting physical interaction.
Below is a list of all available methods:
Setters – Configure the Signal Tower light colors and patterns.
set_color– Sets the pattern for a single Signal Tower color band.set_colors– Sets the state of each Signal Tower light band.
Constructors – Manually initialize and configure the Signal Tower.
SignalTower– Create a Signal Tower.
Setters#
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)
范围 |
描述 |
|---|---|
value |
Optional. The color light to control:
|
state |
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)
范围 |
描述 |
|---|---|
r |
The state for the red LED:
|
y |
The state for the yellow LED:
|
g |
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)
Constructors#
SignalTower#
The Signal Tower is accessed through the arm.signaltower attribute. There is no need to manually construct a SignalTower instance.
# Access the Signal Tower from the arm object
signal_tower = arm.signaltower