Indicador LED#
Introducción#
The led class is used to turn an LED Indicator on and off.
Constructor de clases#
led(
triport::port &port );
Instructor de clase#
Destroys the led object and releases associated resources.
virtual ~led();
Parámetros#
Parámetro |
Tipo |
Descripción |
|---|---|---|
|
|
The 3-Wire Port that the LED Indicator is connected to, written as |
Ejemplos#
// Create an led instance in Port A
led LEDA = led(Brain.ThreeWirePort.A);
Funciones de los miembros#
The led class includes the following member functions:
Before calling any led member functions, a led instance must be created, as shown below:
/* This constructor is required when using VS Code.
LED Indicator configuration is generated automatically
in VEXcode using the Device Menu. Replace the values
as needed. */
// Create an led instance in Port A
led LEDA = led(Brain.ThreeWirePort.A);
on#
Enciende el indicador LED.
Available Functionsvoid on();
Esta función no acepta ningún parámetro.
Return ValuesEsta función no devuelve ningún valor.
Examples// Turn on the LED
LEDA.on();
// Wait 2 seconds
wait(2, seconds);
// Turn off LED
LEDA.off();
off#
Apaga el indicador LED.
Available Functionsvoid off();
Esta función no acepta ningún parámetro.
Return ValuesEsta función no devuelve ningún valor.
Examples// Turn on the LED
LEDA.on();
// Wait 2 seconds
wait(2, seconds);
// Turn off LED
LEDA.off();