vex.touch_led package

VEX Touch LED.

class vex.touch_led.FadeType(value)[source]

Bases: IntEnum

Touch LED Fade Types.

ROBOT MESH PYTHON B:

robotmesh.com/studio/content/docs/vexiq-python_b/html/classvex_1_1_fade_type.html

FAST: int = 2
OFF: int = 0
SLOW: int = 1
class vex.touch_led.Touchled(index: Ports)[source]

Bases: Device

Touch LED.

ROBOT MESH PYTHON B:

Use this class when programming with the touch LED device.

robotmesh.com/studio/content/docs/vexiq-python_b/html/classvex_1_1_touchled.html

Blink color.

ROBOT MESH PYTHON B:

Set the led in the touchled sensor as blinking.

Parameters: - color: color value: 0xRRGGBB - on_time: The time the led should remain on in seconds - off_time: The time the led should remain off in seconds

Blink Color Hue.

ROBOT MESH PYTHON B:

Set the led in the touchled sensor as blinking.

Parameters: - colorHue: The color of the led: ColorHue enum value - on_time: The time the led should remain on in seconds - off_time: The time the led should remain off in seconds

Blink RGB Color.

ROBOT MESH PYTHON B:

Set the led in the touchled sensor as blinking.

Parameters: - red: The red value of the led 0-255 - green: The green value of the led 0-255 - blue: The blue value of the led 0-255 - on_time: The time the led should remain on in seconds - off_time: The time the led should remain off in seconds

brightness(brightness: int)[source]

Set Brightness Percent Level.

ROBOT MESH PYTHON B:

Turn on the led in the touchled sensor, or change current brightness.

Parameters: - brightness: The brightness for the led 0-100

default_fade(fadeType: FadeType)[source]

Set default Fade Type.

ROBOT MESH PYTHON B:

Set the default fade time for the touchled sensor.

Parameters: - fadeType: The type of fade the touchled

will use: FadeType.SLOW, FAST or OFF

off()[source]

Turn off LED.

ROBOT MESH PYTHON B:

Turn off the led in the touchled sensor.

on(color: hex, brightness: int = 100)[source]

Turn on color.

ROBOT MESH PYTHON B:

Turn on the led in the touchled sensor.

Parameters: - color: color value: 0xRRGGBB - brightness: The brightness for the led

on_hue(colorHue: ColorHue, brightness: int = 100)[source]

Turn on Color Hue.

ROBOT MESH PYTHON B:

Turn on the led in the touchled sensor.

Parameters: - colorHue: The color of the led: ColorHue enum value - brightness: The brightness for the led

on_rgb(red: int, green: int, blue: int, brightness: int = 100)[source]

Turn on RGB color.

ROBOT MESH PYTHON B:

Turn on the led in the touchled sensor.

Parameters: - red: The red value of the led, 0-255 - green: The green value of the led, 0-255 - blue: The blue value of the led, 0-255 - brightness: The brightness for the led, 0-100

pressing() bool[source]

Return Touch LED’s pressed status.

ROBOT MESH PYTHON B:

Get the pressed status of the touchled device.

Returns: True if pressed, False otherwise