Hi all,
I am currently working on Solar Tracker for Solar Panel. The mathematical model/formulas with the help of this forum is working great. My System includes three Menus:
1- DISPLAY PARAMETERS (Where curret time/Date, Azimuth, Elevation, Sunset, SunRise, Backlash, Motor Speed, Latitude ,Longitude, Updation time, Azimuth/Elevation Stepper steps, Azimuth / Elevation Steppers Gear Ratios etc will be displayed)
2- CONFIGURAION ( Here The User change the settings and these settings will be then stored in EEPROM. Mostly all the Display Parameters can be set by the User)
I need help in getting idea of How the TIME and DATE can be set?
FOR EXAMPLE:
10 : 42 :18
I want to change the time. using 4 buttons UP DOWN RIGHT and LEFT.
10 : 42 :18
^
Initially the Cursor is at "1" of the 10 as shown above.The "UP button when pressed can change it fro "0" to "2"...Once set, i will press the Right button, the cursor moves to "0" of the 10 as shown below:
10 : 42 :18
^
Then when i press the UP button the value to be change is from "0" to "3". Then when i press the Right Button i get to "42" and the cursor is on "4"... I need help is it possible? any pseudo code or help is highly appreciated.
Thanks Oliver but not that i want.. I have total 06 buttons keypads ..Apart from UP/DOWN RIGHT/LEFT I have SET and ESC keys.. I am using menubackend.h successfully. All i want a simple program to set the time and date as described above. Any help is appreciated from esteemed forum members.
Ok, it was not clear for me that this was a specific request for a solution together with menubackend.
Indeed I did not know menubackend at all. Is it still active and supported? Maybe it should be listed on the playground in the "user interface" section.
I have total 06 buttons keypads
There is also a six-button handler in m2tklib. And, of course, menus are also supported by m2tklib.
The primary goal of m2tklib is to design dialog boxes to let the user enter any kind of data with two- to six- button hardware. Letting the user enter time, as requested by you, is one of m2tklibs primary goals
The dialog box for time entry needs nothing more than the code from my previous post. Well, at least i thought that it is simple
Dear Oliver,
Thank you for answering me and pointing to the solution. Actually i am handling a big menu with the help of menubackend.h flawlessly. user has to be prompt for entering Time/Date Latitude/Longitude, Stepper Gear Ratios and Other informations. So only Time and Date is not needed alone. I will check the library you have mentioned and will see that whether it can work with 20x4 LCD display???...
Meanwhile I am thinking of using of infinite for(; loop in which will be break; only when either ESC or SET button is pressed. In either case a Confirmation dialogue will appear on LCD to get the Approval of enetered Value to put in EEPROM or to Discard the values entered.
I know many peoples here are not answering as i have not submitted the code.. I will try to make it in the form to be submittable and understandable.