 unsigned long tv_onoff = 0x20DF10EF;
 
 
+//
+int r   = 0;
+int o_r = 0;
+
 // PIR
 volatile int pirOnOff = LOW;
 int o_pirOnOff        = LOW;

{
  // receiving ir and change status
  // remote on / off, tv remote on / off
  decode_results results;  

  t.update();

  // PIR
  if ( pirOnOff != o_pirOnOff) {
    Serial.println("PIR rising called");
    if ( pirOnOff == 1 ) {
      doTvControlbyPir("off");
    } else {
      doTvControlbyPir("on");
    }
    o_pirOnOff = pirOnOff;
  }


  lcd.print(Temperature, 1);

  if ( tempCprevious[0] != 100 ) {
    float tempdiff = tempCinside - tempCprevious[0];

    lcd.setCursor(8, 0);
