 }
 
 void setHumidity() {
-  digits[0] = 4;
-  digits[1] = 6;
-  digits[2] = 3;
-  digits[3] = HUMIDITY_SYMBOL;
+  if (humidity < 0) humidity = 0;
+  else if (humidity > 1000) humidity = 1000;
+
+  String textHumidity = String(humidity);
+  int textLength = textHumidity.length();
+  if (textLength == 0) {
+    textHumidity = "00";
+    textLength = 2;
+  }
+  else if (textLength == 1) {
+    textHumidity = "0" + textHumidity;
+    textLength = 2;
+  }
+
+  boolean hasDecimalPoint;
+  if (humidity == 1000) {
+    digits[0] = 1;
+    digits[1] = 0;
+    digits[2] = 0;
+    digits[3] = HUMIDITY_SYMBOL;
+    hasDecimalPoint = false;
+  } else {
+    if (textLength == 2) digits[0] = NOTHING_SYMBOL;
+    else digits[0] = String(textHumidity.charAt(textLength - 3)).toInt();
+    digits[1] = String(textHumidity.charAt(textLength - 2)).toInt();
+    digits[2] = String(textHumidity.charAt(textLength - 1)).toInt();
+    digits[3] = HUMIDITY_SYMBOL;
+    hasDecimalPoint = true;
+  }
   
   decimalPoints[0] = false;
-  decimalPoints[1] = true;
+  decimalPoints[1] = hasDecimalPoint;
   decimalPoints[2] = false;
   decimalPoints[3] = false;
 }

    textTemperature = "0" + textTemperature;
    textLength = 2;
  }

Serial.println(textTemperature);

  boolean hasDecimalPoint = true;
  if ((isNegative && (textLength > 2)) || (!isNegative && (textLength > 3))) {

  
  startModeMillis = millis();
  mode = TEMPERATURE;
}

void loop() {
