Δείκτης LED#
Εισαγωγή#
The led class allows the EXP Brain to turn a connected light-emitting diode (LED) on or off using a 3-Wire Port.

Κατασκευαστής κλάσης#
led(
triport::port &port );
Καταστροφέας κλάσης#
Destroys the led object and releases associated resources.
virtual ~led();
Παράμετροι#
Παράμετρος |
Τύπος |
Περιγραφή |
|---|---|---|
|
|
The 3-Wire Port that the LED Indicator is connected to, written as |
Παραδείγματα#
// Create an led instance in Port A
led LEDA = led(Brain.ThreeWirePort.A);
Συναρτήσεις Μελών#
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#
Ενεργοποιεί την καθορισμένη ενδεικτική λυχνία LED.
Available Functionsvoid on();
Αυτή η συνάρτηση δεν δέχεται καμία παράμετρο.
Return ValuesΑυτή η συνάρτηση δεν επιστρέφει τιμή.
Examples// Turn on the LED
LEDA.on();
// Wait 2 seconds
wait(2, seconds);
// Turn off LED
LEDA.off();
off#
Απενεργοποιεί την καθορισμένη ενδεικτική λυχνία LED.
Available Functionsvoid off();
Αυτή η συνάρτηση δεν δέχεται καμία παράμετρο.
Return ValuesΑυτή η συνάρτηση δεν επιστρέφει τιμή.
Examples// Turn on the LED
LEDA.on();
// Wait 2 seconds
wait(2, seconds);
// Turn off LED
LEDA.off();