How to add calibration to a humidity contoller using UNO and DHT22 sensor?
To get better calibration, you need more calibration points. In the example below, I use 8 measurement points.

Given 8 humidity calibration bags for 20, 30, 40, 50, 60, 70, 75 and 80%.

int calvalues[] = {20, 30, 40, 50, 60, 70, 75, 80};


You would take several samples with the DHT sensor and build a table using the averages:

int dhtvalues[] = {15, 28, 39, 51, 63, 75, 84, 89};


As you can see, the DHT is below the real values in the lower range and above the real values in the upper range. But it could also be the opposite way.

You can then write this function:

#define COMPENSATION_POINTS 8

int compensate(int sensor_value)
{
  for(int index=1; index&lt;COMPENSATION_POINTS; index++)
  {
    if (dhtvalues[index]&gt;sensor_value)
    {
      int dhtLow = dhtvalues[index-1];
      int dhtHigh = dhtvalues[index];
      int calLow = calvalues[index-1];
      int calHigh = calvalues[index];

      return map(sensor_value, dhtLow, dhtHigh, calLow, calHigh);
    }
  }
}


which does linear interpolation for all the values that fall somewhere in between.

Here's some test code, which goes through the values in the expected range.

void setup() {
  Serial.begin(9600);
  for(int hum=15; hum&lt;=89; hum++)
  {
    Serial.print("DHT value: ");
    Serial.println(hum);
    Serial.print("Compensated to: ");
    Serial.println(compensate(hum));
  }
}

void loop() {
  delay(1000);
}


Output:

DHT value: 15
Compensated to: 20
DHT value: 16
Compensated to: 20
DHT value: 17
Compensated to: 21
DHT value: 18
Compensated to: 22
...
DHT value: 87
Compensated to: 78
DHT value: 88
Compensated to: 79
DHT value: 89
Compensated to: 79


Applied to your case:

[...]
  int chk = DHT.read22(DHT22_PIN);
  lastcheck = millis();

  lcd.setCursor(0, 0);
  lcd.print("Humidity: ");
  lcd.setCursor(13, 0);
  int compensated = compensate(DHT.humidity);   // &lt;- new line
  lcd.print(compensated);                       // &lt;- changed line
[...]