MegunoLink Pro’s User Interface Panel was created to modify settings and control Arduino programs using serial commands. Most programs have a few settings that you’d like to change from time to time:

a set-point temperature,

the data transmission rate, or

the power for a radio transmitter, for example.

Information entered into common controls such as buttons, check boxes and sliders can be sent through a serial channel. By sending configuration through a serial port or Ethernet connection, you don’t need to modify and upload a new program for every change. Almost any program, even Blink, could benefit from a simple user interface:

Building the User Interface

To build this user interface in MegunoLink, create a new Interface Panel Visualizer from the Start Page, or the Visualizers popup and add labels and controls by dragging them from the toolbox.

You can use many different controls to build your user interface including:

Labels

Buttons

Pictures

Numeric up/down

Lists

Panels

Tabbed layout panels

Flow layout panels

All controls have properties. With properties you can:

change the foreground or background colour

add a background image

set a minimum and maximum value for numeric up/down and track-bar controls

anchor a control to an edge of the panel

We built a simple user interface for a program to blink the LED built-in to most Arduino boards. The interface lets you control two parameters through MegunoLink Pro: how fast the LED blinks and how long it remains on for each blink. A numeric up/down control is used for each parameter. The control named Interval sets the time between blinking; the length of the flash is set a control named Duration . Both are set in milliseconds. We also added buttons which send commands to the Arduino to print the current settings, and we use a label control for the title text.

This short video shows the interface panel being built (3 minutes):