 
 // Variables for buttons
 
-
 //  Buttons ports
 const uint8_t button[6] = {
   8, 9, 10, 11, 12, 13

  //  Опрос кнопок с использованием антидребезговой системы
  for (USHORT i = 0; i < 6; ++i) {
    current_state[i] = debounce(current_state[i], last_state[i], button[i]);
    if (last_state[i] == LOW && current_state[i] == HIGH)
      Serial.print(buttonString[i]);
  }
  
  /*---------------------------------------------------------------------------------------*/
  // Реализация опроса фотосенсоров

  v_ToOffice = analogRead(l_EntranceToOffice);  
  v_ToBedroom = analogRead(l_EntranceToBedroom);

      isSending5 = false;
    }
  }

  //  Write current analog values to additional variables
  //  to detect its changing during next iterations
  v_old_ToOffice = v_ToOffice;
  v_old_ToBedroom = v_ToBedroom;
  v_old_FromOffice = v_FromOffice;
  v_old_FromBedroom = v_FromBedroom;
  old_value4 = value4;
  old_value5 = value5;

  //  Listen inputs every 100 miliseconds
  delay(100);
}
