daemons:
I do like the idea of simplified I2C-LCD+encoder menu system, so kindly interested in the current status of the development
I must admit that I was lazy and did not finish any rotary-menu code yet.
At least not such finished, that I wanted to show the code to someone else.
Everytime I started something and asked somebody about, there was either no response or people told me that they needed it completely different than suggested by me.
But after I saw your posting today, I tried a bit something new with some old code of mine.
For me it works.
What I found out until now is that: I cannot create a all-in-one-code that will handle everything: Simple menus, 2D- and pull-down menus, menus with 2,3 or 4 level, menu items adding and removing at runtime, function calling menus, configuration settings menus, menus with 3, 4, 5 or 6 buttons, date and time editing in different international time/date formats.
So something will have to be limited and I'd say:
Display should be a LCD text display.
And control element a mechanical rotary encoder with momentary switch only.
Perhaps adaptable to common I2C LCDs by "conditional compile".
daemons:
get back to jurs post:
Why not just enter into SetTime Menu with short-button,
then make blink the HH, rotary for change the value, wait for short-button like confirmation,
go blink MM, rotary for change the value, short-button for confirmation, and thats it,
hour and minutes are saved. Same solution can be used for YYYY-MM-DD. and no bother.
why dont we make the long_button as back, and doubleclick-button as cancel ?
Even the user interface cannot be made for everyone, if everybody wants something different.
Currently I'm at this state of menu interaction:
-
Menu works with a rotary encoder and just two actions: rotate or button press
No sophisticated double-click or long-click actions
-
Display can display menu items and edit date or time
Date format is currently dd.mm.yyyy and time format is HH:MM:SS
No fancy blinking, but a "cursor" is set under the character that can be edited
Usage and editing logic:
- Button press ==> enabled menu
- Rotate left/right ==> select menu item
- If button is pressed on a "date" menu item ==> activate date editor
- If button is pressed on a "time" menu item ==> activate time editor
Editor works like that:
- display editable value and "OK"
- rotate left/right ==> Move cursor for editing a single digit or for "OK"
- rotate cursor right outside the LCD display ==> Abort editing
- click button while on editable digit: increase digit (roll-over from 9 to 0)
- click button while on "OK" ==> check validity of entered value and exit
The advantage of waiving "double clicks" and "long clicks" from the user control is: The user will be enabled for fast editing with fast clicking, because it is never required to wait for "double click time" or "long click time" that might create a different click from an initial button press.
If my time allows, I'll put some more comments into the code and put it in a form so I can upload an example program. Possibly a "timer switch with LCD and rotary encoder", that can: Display date and time, edit date and time, and also edit some daily switching times for ON/OFF of a device.
If I find some time this weekend, I hopefully will be able to send some experimental code for those who are interested by the beginning of next week.