winnie mong
Junior Member level 3
hey friends...
i am doing a programmable timer switch and i am stuck at producing a routine that do the setting of time.
i have three buttons to use,initially the display will be showing current time and the SELECT button is used to toggle between setting minutes and setting hours states where at each of the states two zeros will be displayed and the user will be allowed to press the SET button to increment to where they want to set the digits.
the mode button is then used to save the settings.
I am asking for help in constructing this routine in c language.thanks in advance..
i have this following part that toggles between minutes and hours, i dont know how include the part that does the incrementing.
i am doing a programmable timer switch and i am stuck at producing a routine that do the setting of time.
i have three buttons to use,initially the display will be showing current time and the SELECT button is used to toggle between setting minutes and setting hours states where at each of the states two zeros will be displayed and the user will be allowed to press the SET button to increment to where they want to set the digits.
the mode button is then used to save the settings.
I am asking for help in constructing this routine in c language.thanks in advance..
i have this following part that toggles between minutes and hours, i dont know how include the part that does the incrementing.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 void toggling() { int prev_press ; prev_press =1; if (prev_press) { prev_press=0; for(i=0;i<5;++i) { display("00 "); delay(Delay5000ms); display(" "); delay(Delay5000ms); } } else{prev_press=1; for(i=0;i<5;++i) { display(" 00"); delay(Delay5000ms); display(" "); delay(Delay5000ms); } } }