This page contains detailed documentation for the Interface Panel Arduino Library.

Check out Build an Arduino Interface for a guide to getting started with Interface Panels.

The InterfacePanel class in the MegunoLink Pro Arduino Library provides a convenient set of methods for sending messages to MegunoLink’s Interface Panel to re-configure and request the property values of the objects shown. This library lets you:

  • Set the value of a control on the interface panel
  • Get the value of a control on the interface panel

Methods

InterfacePanel(ChannelName — optional ) (constructor)
SetText(ControlName, Value)
SetProgress(ControlName, Value)
SetNumber(ControlName, Value)
SetListIndex(ControlName, Index)
SetListValue(ControlName, Value)
SetCheck(ControlName, Checked — optional)
ClearCheck(ControlName)
CallCommand(CommandName)
GetValue(ControlName, PropertyName)
HideControl(ControlName)
ShowControl(ControlName)
EnableControl(ControlName)
DisableControl(ControlName)
SetForeColor(ControlName,Color)
SetBackColor(ControlName,Color)
SetReadOnly(ControlName, True/False)
SetMinimum(ControlName, Value)
SetMaximum(ControlName, Value)
SetGaugeLabel(ControlName, LabelIndex, LabelText)

Detailed Descriptions

InterfacePanel(ChannelName — optional )

Constructs an InterfacePanel variable, with an optional ChannelName.

SetText(ControlName, Value)

Sets the text displayed in a text box control.

SetProgress(ControlName, Value)

Sets the current value displayed by a progress bar control.

SetNumber(ControlName, Value)

Sets the number displayed in a numeric up/down control, track-bar, gauge or other compatible numeric control.

SetListIndex(ControlName, Index)

Sets the index of the item selected in a value-list control. The first item in the list box is 0.

SetListValue(ControlName, Value)

Selects the item with the given value in a single-selection, value-list control. In a multi-selection value-list control, selects any items where a bitwise and between the item value and the new value is equal to the item value. This allows a list box to represent bit-flag variables.

SetCheck(ControlName, Checked — optional)

Sets the check-state of a check box control. If the optional Checked parameter is missing, the control is checked. Otherwise, if Checked is true, the control is checked; if false, the control is unchecked.

ClearCheck(ControlName)

Clears the check mark from a check box control.

CallCommand(CommandName)

Invokes a named command from the message library attached to the message processor. Typically the command returns a serial message.

GetValue(ControlName, PropertyName)

Returns the value of a serial message property for the named control. The format used for the message return is described in the Message Processor Reference.

ShowControl(ControlName)

Makes a previously hidden control visible.

HideControl(ControlName)

Hides a control so it is no longer visible.

EnableControl(ControlName)

Enables a control so it is accessible to the user.

DisableControl(ControlName)

Disables a control so it is grayed out and not accessible to the user.

SetForeColor(ControlName,Color)

Controls the foreground color of the interface element. Available colors can be found here.

SetBackColor(ControlName,Color)

Controls the background color of the interface element. Available colors can be found here.

SetReadOnly(ControlName,True/False)

Adjusts the controls read only property.

SetMinimum(ControlName,Value)

Controls the minimum value of supported interface elements.

SetMaximum(ControlName,Value)

Controls the Maximumvalue of supported interface elements.

SetGaugeLabel(ControlName, LabelIndex, LabelText)

Allows you to adjust the text for one of the gauge labels in the collection. In the example below we are setting the 0th label in the collection for the panel called MyGauge to display the text “Max Speed Reached”.

Start typing and press Enter to search