     digitalWrite(i, level);
     i += i == 9 ? 4 : 1; //Skip the RTC Pins (10, 11, 12).
   }
-}
+}


void MeasureTime()
{
  #ifdef DEBUG
  int reading = analogRead(5);
  sprintf(buffer, "Reading from pot: %04d\n", reading);
  Serial.print(buffer);
  isItDayTime = analogRead(5) > 511;
  #else
  isItDayTime = analogRead(5) > 511;
  #endif
  WriteOutput(!isItDayTime); //Make changes if needed.
}



void loop()
{
  int threshold = 60000; //In final product, the board will check and write every minute.
  #ifdef DEBUG
  isItAutoMode = digitalRead(13) == HIGH;
  threshold = 1000; //Under development, the board will check and write every second.
  #endif
  if (millis() - timer >= threshold)
  {
