|
| touchled (int32_t index) |
| Creates a new touchled sensor object on the port specified in the parameter.
|
|
bool | installed () |
|
int32_t | value () |
| Gets the value of the touchled sensor.
|
|
void | on (colorType color, uint32_t brightness=100) |
| Turn on the led in the touchled sensor.
|
|
void | on (uint32_t hue, uint32_t brightness=100) |
| Turn on the led in the touchled sensor.
|
|
void | on (uint8_t red, uint8_t green, uint8_t blue, uint32_t brightness=100) |
| Turn on the led in the touchled sensor.
|
|
void | off (void) |
| Turn off the led in the touchled sensor.
|
|
void | setColor (colorType color) |
|
void | setFade (fadeType setting) |
| Sets the default fade time for the touchled sensor.
|
|
void | setBrightness (uint32_t brightness) |
| Turn on the led in the touchled sensor, or change current brightness.
|
|
void | setBlink (colorType color, double onTime=0.25, double offTime=0.25) |
| Set the led in the touchled sensor as blinking.
|
|
void | setBlink (uint32_t hue, double onTime=0.25, double offTime=0.25) |
| Set the led in the touchled sensor as blinking.
|
|
bool | pressing () |
| Get the pressed status of the touchled device.
|
|
void | pressed (void(*callback)(void)) |
| Calls a function when the touchled is pressed.
|
|
void | released (void(*callback)(void)) |
| Calls a function when the touchled is released.
|
|
| device (int32_t index) |
|
IQ_DeviceType | type () |
|
int32_t | index () |
|
void | init (int32_t index) |
|
int32_t | readDigitalPin () |
|
int32_t | readAnalogPin () |
|
|
void | setPollInterval (int32_t value) |
|
bool | pollValid (bool bSave) |
|
int16_t | _index |
|
Definition at line 26 of file vex_touchled.h.
◆ touchled()
vex::touchled::touchled |
( |
int32_t | index | ) |
|
Creates a new touchled sensor object on the port specified in the parameter.
- Parameters
-
port | index to the brain port. |
◆ installed()
bool vex::touchled::installed |
( |
| ) |
|
|
virtual |
◆ on() [1/3]
void vex::touchled::on |
( |
colorType | color, |
|
|
uint32_t | brightness = 100 ) |
Turn on the led in the touchled sensor.
- Parameters
-
color | The color of the led |
brightness | The brightness for the led |
◆ on() [2/3]
void vex::touchled::on |
( |
uint32_t | hue, |
|
|
uint32_t | brightness = 100 ) |
Turn on the led in the touchled sensor.
- Parameters
-
hue | The hue of the led |
brightness | The brightness for the led |
◆ on() [3/3]
void vex::touchled::on |
( |
uint8_t | red, |
|
|
uint8_t | green, |
|
|
uint8_t | blue, |
|
|
uint32_t | brightness = 100 ) |
Turn on the led in the touchled sensor.
- Parameters
-
red | The red value of the led |
green | The green value of the led |
blue | The blue value of the led |
brightness | The brightness for the led |
◆ pressed()
void vex::touchled::pressed |
( |
void(* | callback )(void) | ) |
|
Calls a function when the touchled is pressed.
- Parameters
-
callback | A reference to a function. |
◆ pressing()
bool vex::touchled::pressing |
( |
| ) |
|
Get the pressed status of the touchled device.
- Returns
- Returns the state of the touchled device. If it is pressed it will return a one. If unpressed, it will return a zero.
◆ released()
void vex::touchled::released |
( |
void(* | callback )(void) | ) |
|
Calls a function when the touchled is released.
- Parameters
-
callback | A reference to a function. |
◆ setBlink() [1/2]
void vex::touchled::setBlink |
( |
colorType | color, |
|
|
double | onTime = 0.25, |
|
|
double | offTime = 0.25 ) |
Set the led in the touchled sensor as blinking.
- Parameters
-
color | The color of the led |
onTime | The time the led should remain on in seconds |
offTime | The time the led should remain off in seconds |
◆ setBlink() [2/2]
void vex::touchled::setBlink |
( |
uint32_t | hue, |
|
|
double | onTime = 0.25, |
|
|
double | offTime = 0.25 ) |
Set the led in the touchled sensor as blinking.
- Parameters
-
hue | The hue of the led |
onTime | The time the led should remain on in seconds |
offTime | The time the led should remain off in seconds |
◆ setBrightness()
void vex::touchled::setBrightness |
( |
uint32_t | brightness | ) |
|
Turn on the led in the touchled sensor, or change current brightness.
- Parameters
-
brightness | The brightness for the led |
◆ setFade()
void vex::touchled::setFade |
( |
fadeType | setting | ) |
|
Sets the default fade time for the touchled sensor.
- Parameters
-
setting | The type of fade the touchled will use, slow, fast or off |
◆ value()
int32_t vex::touchled::value |
( |
| ) |
|
|
virtual |
Gets the value of the touchled sensor.
- Returns
- Returns an integer that represents whether the touchled is pressed of not
Reimplemented from vex::device.
The documentation for this class was generated from the following file: