void menu2 ()
{boolean ret=0;
byte secod1=0;
 byte cur=1; 

do { 
      DateTime now = rtc.now(); 
//*********************************  
hour1 = now.hour(); 
minute1 = now.minute();
second1 = now.second();
//month1 =now.month();
//day1= now.day();
//year1 =now.year();


//****************************************   
  delay (100);
 secod1++; 
if (secod1==3) 
{ fl=!fl;
 secod1=0;
}

   u8g.firstPage(); 
   do {
      u8g.setColorIndex(1);
    u8g.drawXBMP(0, 0, 128, 64, rabset);
    //********************************************************************
    
  u8g.setColorIndex(0);
  //u8g.setFont(u8g_font_04b_03br);//5x5
  //u8g.setFont(u8g_font_courR08);//7x5
  u8g.setFont(u8g_font_unifont);
  u8g.setPrintPos(30, 11); 
 u8g.print(hour1/10,DEC); 
 u8g.print(hour1%10,DEC); 
  u8g.print(":");
  u8g.print(minute1/10,DEC);
  u8g.print(minute1%10,DEC);
  u8g.print(":"); 
 u8g.print(second1/10,DEC);
 u8g.print(second1%10,DEC);
 //**********************************************************************
 if (cur==1)
 { if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
   u8g.drawBox(37,20,49,1);
  }
if (cur==2)
   { if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
    u8g.drawBox(6,35,11,1);}
if (cur==3)
    {if(fl==0){u8g.setColorIndex(0);}
       if(fl==1){u8g.setColorIndex(1);}
        u8g.drawBox(40,35,13,1);}
if (cur==4)
{if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
  u8g.drawBox(74,35,11,1);}
if (cur==5)
    {if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
     u8g.drawBox(108,35,13,1);}
if (cur==6)
{if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
     u8g.drawBox(25,53,7,1);}
if (cur==7)
{if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
   u8g.drawBox(61,53,7,1);}
if (cur==8)
{if(fl==0){u8g.setColorIndex(0);}
    if(fl==1){u8g.setColorIndex(1);}
   u8g.drawBox(91,53,12,1);}

  
  } while( u8g.nextPage() );
  
  //**********************PDY********************  
 if (irrecv.decode(&results)) 
   {
         irrecv.resume(); // Receive the next value
          digitalWrite(13, HIGH); 
         if(results.value == 0xE908B15) //down
           {  if(cur==2)
             {
                cur=6;
              }
             if(cur==1)
             {
                cur=2;
              }
               if(cur==3)
             {
                cur=7;
              }
               if((cur==4)||(cur==5))
             {
                cur=8;
              }
              
           }
          if(results.value == 0xE900B95) //up E900B95
            {   if(cur==2)
               {cur=1;
                }
                if(cur==6)
               {cur=2;
                }
                if(cur==8)
               {cur=4;
                }
                if(cur==7)
               {cur=3;
                }
            }
            if(results.value == 0xE904BD5) //right E904BD5
             {
              cur=cur+1;
                if (cur>8){cur=1;}
              }
               if(results.value == 0xE90CB55)   //left E90CB55
             {
              cur=cur-1;  
                if (cur<1){cur=8;}
               } 
               if(results.value == 0xE101A04) //enter E101A04
               {
                  if(cur==1)
                     {menu=0;
                      settim=1;
                      ret=1;
                      }
                      if(cur==2)
                     {menu=0;
                      settimer=1;
                      ret=1;
                      }
                      if(cur==3)
                     {menu=0;
                      nigts=1;
                      ret=1;
                      }
                      if(cur==4)
                     {//menu=0;
                      //settim=1;
                      //ret=1;
                      }
                      if(cur==5)
                     {//menu=0;
                     // settim=1;
                      //ret=1;
                      }
                      if(cur==6)
                     {menu=0;
                      lampse=1;
                      ret=1;
                      }
                      if(cur==7)
                     {//menu=0;
                      //settim=1;
                     // ret=1;
                      }
                      if(cur==8)
                     {menu=0;
                      nigts=1;
                      ret=1;
                      }
                      
               }//выход в ....
                  if(results.value == 0xE106A74) //menu E106A74
            {
              menu=0;          
               ret=1;
             } //выход без сохранения
              
            delay (100);
                irrecv.resume(); // Receive the next value
                 digitalWrite(13, LOW);
                   }//ir
              
  
   }while (ret<1); 
}
