 
   // DHT AIR T/RH SENSOR
   int chk = DHT.read11(DHT11_PIN);
+  int dht_checksum_error=0; // variable to hold error codes
   switch (chk)
   {
     case DHTLIB_OK:
       //               Serial.print("OK,\t");
       break;
     case DHTLIB_ERROR_CHECKSUM:
-      Serial.print("Checksum error,\t");
+      //Serial.print("Checksum error,\t");
+      dht_checksum_error |= 0x01;
       break;
     case DHTLIB_ERROR_TIMEOUT:
-      Serial.print("Time out error,\t");
+      //Serial.print("Time out error,\t");
+      dht_checksum_error |= 0x02;
       break;
     case DHTLIB_ERROR_CONNECT:
-      Serial.print("Connect error,\t");
+      //Serial.print("Connect error,\t");
+      dht_checksum_error |= 0x04;
       break;
     case DHTLIB_ERROR_ACK_L:
-      Serial.print("Ack Low error,\t");
+      //Serial.print("Ack Low error,\t");
+      dht_checksum_error |= 0x08;
       break;
     case DHTLIB_ERROR_ACK_H:
-      Serial.print("Ack High error,\t");
+      //Serial.print("Ack High error,\t");
+      dht_checksum_error |= 0x10;
       break;
     default:
-      Serial.print("Unknown error,\t");
+      //Serial.print("Unknown error,\t");
+      dht_checksum_error |= 0x80;
       break;
   }
   // display data

  Serial.println("Node setup complete.");
  Serial.println("--------------------------------------------");
  Serial.println();
  Serial.println("Soil Moisture, Light (RGB), Soil Temperature, Air Relative Humidity, Air Temperature, IR Level");
  delay(2000);
}


  Serial.print(AirHumidity, DEC); // Air Humidity
  Serial.print(", ");
  Serial.print(photoIR);  // IR level
  Serial.print(", ");
  Serial.print(dht_checksum_error);  // DHT checksum error


  // finish
