BPS#
A BPS
object is returned from get_bps.
Member functions#
The following are member functions of BPS
objects.
get_state#
get_state(buttonNum)
Returns the state of the button with integer number buttonNum
, which can be one of the constants RELEASED
, PRESSED
, HELD
or REPEAT
.
For example:
bps = get_bps(1)
btn = bps:get_state(1)
set_led#
set_led(button, effect[, intensity[, fade]])
Set the effect and intensity of a BPS button LED according to the parameters:
Parameter |
Value Type |
Description |
Value Example |
---|---|---|---|
|
integer (1-8) |
Number of the BPS button to set an effect on |
|
|
integer |
Integer value of constants: |
|
|
integer (0-255) |
Optional. Intensity level to set on the LED. If this parameter is not specified, full intensity will be set on the LED. |
|
|
float |
Optional. Fade time to apply the override change, in seconds. |
|
For example:
-- Set button 1 on BPS 1 to Fast Flash at full intensity
get_bps(1):set_led(1,FAST_FLASH,255)