The InterfacePanel class in the MegunoLink Pro Arduino Library provides a convenient set of methods for sending messages to a MLP UI Message Processor on a MegunoLink Pro Interface Panel. The messages sent are processed by a MLPUIMessageProcessor component, which must be added to the interface panel in the designer. This library lets you:

  • Set the value of a control on the interface panel
  • Get the value of a control on the interface panel
  • Invoke a message from the MessageLibrary component attached to the MLPUIMessageProcessor

To use the InterfacePanel functions:

  1. Install the MegunoLink Pro Arduino library
  2. Add #include “MegunoLink.h” to the top of your Arduino program
  3. Create a InterfacePanel variable
  4. Call methods on the InterfacePanel variable

Example

This program sends out commands to set the value of a progress bar named ‘Progress’, a numeric up/down control named ‘Current’ and a text box named ‘Status’ periodically.

An Arduino program to send data to MegunoLink Pro

An Arduino program can update controls on a MegunoLink Pro Interface Panel by sending specially formatted commands through the serial port.

Start typing and press Enter to search