User Interface (Part 2)

Part 1234, 5

Designing menus for Arduino based applications

To my opinion, the simplest human interface for Arduino application consists in a 2×16 characters LCD and a rotary encoder. Then comes the question of the firmware for interpreting the rotary encoder pulses and converting them in menus, sub menus, parameters, returns and exists. Even though the design of menus was quite easy, standardizing the code and compelling it in few bytes was not piece of cake.

Let’s start with a preview of the navigation menu

Clicking on the encoder shaft will start the menu display, such as:

SELECT OPTION
OPTION 1

Shifting the encoder will scroll the required options, while the first line sticks to its position. In fact the last option shall give the user a chance to leave the menu, and will display EXIT or QUIT on LCD line 2, such as:

SELECT OPTION
EXIT

At this particular stage, depressing the encoder’s shaft will turn the display back to its previous stage. On the other hand, depressing the encoder’s shaft whiles an option’s name (e.g. option 2) is displayed will change the display to:

OPTION 2
SUB OPTION 1

And so on down to some parameter: e.g.

SUB OPTION 3
PARAMETER 1

Then depressing the encoder’s shaft will set the display to

PARAMETER 1
CURRENT_VALUE_OF_PARAMETER_1

Shifting the encoder will increment/decrement the value of the selected parameter.
Unsolved problem: it is not reasonable to think about scrolling all possible values up (or down) to an ESCAPE stage. Depressing the encoder’s shaft for more that a certain time (e.g. 2 s) may achieve this function.

Next Post on same subject

Leave a Reply

You must be logged in to post a comment.