Go Down

Topic: Anyone else developing a user interface (UI) on LCDs and keypads/buttons? (Read 5 times) previous topic - next topic


State machine is a good idea. I'm thinking about HMI standards in industrial control panels. I have one sitting on my couch.

To make the library small, I only implemented lists instead of lists and menus. To make a menu, just call select_list() to ask the user to select item from a list and switch upon the user selected list item :)

To implement multilevel menu/list, you just need to add another select_list() where the sub menu entry is. You also want to add a return in one of the sub menu's switch case.


I think that the way to go would be to implement the methods to

- refresh screen
- next item (meaning the menu where we are now)
- previous item (or just implement a bounded buffer)
- enter
- back (this can be left out and in every submenu, there would be an option to move up on the menu tree... depends on the developer and number of options, really)

The user of the library would only have to fill out a structure that would have all the menu data in it, and the methods would merely cycle through that structure.

I can have a go at writing something for this... but not over weekend. ;)
Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).


Good idea!

Right now my phi_prompt select_list() will take a list from PROGMEM and display it according to the parameters in the structure and interacts with the user (up button is next item, down is prev) until the user hits left, right, enter, or escape. So one function call then the return is final decision of the user.

The left and right buttons can be used in a larger display or just 16X2 to navigate between selections much like a dialog box with tab keys in Windows. Say you change one number and press left, you can change the previous field and right a few times to change another field. I have not implement that into an actual function of dialog box (including several interactive lists and number entries) but I'm already using the basic blocks in my clock adjustments:

I will just add a function that sets up a user interface like a dialog!



Just FYI, I'm updating this UI library to include the following things, more useful if you have a 16X4 or 20X4 display:
   1. Support 20X4 character screen with more flexible "2X2? list mode so you can list M columns by N rows with X  characters per row, all M, N, and X are your choice (Done)
   2. List your "2X2? list anywhere on a larger screen instead of the basic 16X2 screen (Done)
   3. Easy to call "YES/NO" dialog for user to choose.(Planning)
   4. Easy to display "YES/NO", "HIGH/LOW" options for numerical inputs so you don't have to construct a list and do it the list way.(Planning)
   5. Add scrolling texts that scrolls to fit in smaller space (planning)
   6. Add floating point number input (planning)
   7. Add event function so each time the user changes a number, a function is called to update operations (planning)
   8. Add dialog functions to make a dialog. This function creates a complete dialog with various controls and the user uses left and right keys to navigate among the controls and change their values. It is going to look like a dialog on your computer. You make some choices and push yes. (planning)

Any suggestions? Thanks.

Here is the link to the library:


Scrolling up/down menu? With custom character 'scroll bar' on the far right column?
That's what I'd like to see/code myself :)

Go Up