       }
       break;
     case RPI_STAT_RUNNING:
+      if(loop_count % 20 == 0){ check_expired_timer(); }
       break;
     case RPI_STAT_WAIT_SHUTDOWN:
       static int shtdwn_delay_count=0;

            digitalWrite(pin_shutdown,HIGH);
          }
        }else{
          if(shtdwn_delay_count>20*30){ //50*20 * 30 msec (30sec)
            raspi_stat = RPI_STAT_SHUTDOWN;
            Serial.println("*** TURN OFF power successfully ***");
            turn_off();

      wakeup_by_timer();
  }
}

void check_expired_timer(){
  unsigned long now = millis();
  Serial.println(now);
  Serial.println(raspy_timer[0]);
  if(raspy_timer[0] > 0 && now > raspy_timer[0]){
      Serial.println("Timer1 expired");
      raspy_timer[0]=0;
  }
  if(raspy_timer[1] > 0 && now > raspy_timer[1]){
      Serial.println("Timer2 expired");
      raspy_timer[1]=0;
  }
}

unsigned long timer_data_com1 = 0; 
unsigned long timer_data_com2 = 0; 

void callback_i2c_receive(int length){
  unsigned long now = millis();
