LRemote Control Classes
These control classes are provided to create UI controls to the canvas created by LRemote:
LRemoteLabel: a static text label
LRemoteButton: a rectangular button with a text label
LRemoteCircleButton: a round, circular button with a text label
LRemoteSlider: a slider with adjustable range and initial value
LRemoteSwitch: a on/off switch
LRemoteJoystick: an analog joystick control
To use these classes, declare them in the global context:
And adjust the text label, position and size in setup() function, and then call LRemote.addControl() to add the control to the remote UI canvas.
Methods for All Controls
setText()
setColor()
setPos()
setSize()
Set the text label of the control
Syntax
text: a String representing the text label of the control
Returns
none
Methods for All Controls except LRemoteLabel
isValueChanged()
getValue()
Check if the LinkIt Remote app has made a change to the UI control
Syntax
none
Returns
true if the LinkIt Remote has made changes to this control.
false if the LinkIt Remote hasn't made any changes to this control since last call to LRemote.process().
Methods for LRemoteSlider Only
setValueRange()
Set the range of values for the slider control
Syntax
min_value: The minimum allowed value for the slider. The limit is -32767.
max_value: The maximum value allowed for the slider. The limit is 32767.
init_value: The inital value of the slider.
Returns
none
Methods for LRemoteLabel Only
updateText()
Change the label text. You can change the text after the user has connected.
Syntax
new_text: The new text to be update to the label. The limitation is 15 bytes.
Returns
none
Last updated