 // Timer
 Timer t;
 long temp_Mills;
+int tvIsOnEvent;
+int tvIsOffEvent;
 
 // eeprom status
 int o_pwrSrc;

  // pin mode
  pinMode(SETUP_IN_PIN, INPUT);
  pinMode(WRK_MODE_IN_PIN, INPUT);
  /*
  pinMode(DN_IN_PIN, INPUT_PULLUP);
  pinMode(UP_IN_PIN, INPUT_PULLUP);
  */
  pinMode(PIR_IN_PIN, INPUT);

  // buzzer
  pinMode(BZ_OU_PIN, OUTPUT);
  digitalWrite(BZ_OU_PIN, HIGH);
  digitalWrite(SETUP_IN_PIN, HIGH);
  digitalWrite(WRK_MODE_IN_PIN, HIGH);

  delay(300);



  return tempC;
}

void alarm_set()
{
