Page 99 - MDP2020-2
P. 99

················································································  명장양성프로젝트  【MDP】  과제발표회  자료집  Ⅱ    |  93



                else{
                    u8g.setPrintPos(85,  47);
                    u8g.print(Sec);
                }


                //Min  display
                if(Min<10){
                    u8g.drawStr(57,  47,  "0");
                    u8g.setPrintPos(67,  47);
                    u8g.print(Min);
                }
                else{
                    u8g.setPrintPos(57,  47);
                    u8g.print(Min);
                }


                //Hour  display
                if(Hour<10){
                    u8g.drawStr(29,  47,  "0");
                    u8g.setPrintPos(39,  47);
                    u8g.print(Hour);
                }
                else  if(Hour>24)  Hour=0;
                else  if(Hour>12)  Hour=Hour-12;
                else{
                    u8g.setPrintPos(29,  47);

                    u8g.print(Hour);
                }
            }


            void  draw(void)  {
                //year,  month,  day,  date  display
                u8g.setFont(u8g_font_6x10);
                u8g.drawStr(36,  20,  "2020");
                display_month();
                display_day();
                display_date();


                //Hour,  Min,  Sec  display
                display_time();


            }
            //***************************************************************************
   94   95   96   97   98   99   100   101   102   103   104