having problem with this code

include "Arduino.h"
#include "Dht11.h"

enum {
// The data I/O pin connected to the DHT11 sensor
DHT_DATA_PIN = 2,

// The data I/O pin connected to the soil sensor
SOIL_PIN = 3,

// The baud rate of the serial interface
SERIAL_BAUD = 9600,

// The delay between sensor polls.
POLL_DELAY = 2000,
};

void setup() {
pinMode(SOIL_PIN, INPUT);
Serial.begin(SERIAL_BAUD);
Serial.print("Dht11 Lib version ");
Serial.println(Dht11::VERSION);
}

void loop() {
static Dht11 sensor(DHT_DATA_PIN);

switch (sensor.read()) {
case Dht11::ok:
Serial.print("Humidity (%): ");
Serial.println(sensor.getHumidity());

Serial.print("Temperature (C): ");
Serial.println(sensor.getTemperature());
break;

case Dht11::ERROR_CHECKSUM:
Serial.println("Checksum error");
break;

case Dht11::ERROR_TIMEOUT:
Serial.println("Timeout error");
break;

default:
Serial.println("Unknown error");
break;
}

if (digitalRead(SOIL_PIN)) {
Serial.println("Soil moisture level is bellow threshold");
}
else {
Serial.println("Soil moisture level is abowe threshold");
}
delay(POLL_DELAY);
}

Hi patrickeff.

You may want to EDIT your post and use code tags ( </> ).
The forum has a bad habit of chewing up some characters unless you do.

When you edit you may also want to re-insert the code in case the forum ate some for breakfast.

VITAL information that you should also provide on your next post include the following.

Actual problem description ?
OS including version ?
Browser you use including version ?
Types of USB port being used with the Arduinos ?
Arduino board type being used ? (doesnt matter if its a clone)
Copies of any error reports seen. (PLEASE use code tags ( </> ) to post those errors) ?

Other things to try to get a bit more information.
Before loading any sketches got straight to PREFERENCES and turn on ALWAYS SHOW OUTPUT PANEL and CONSOLE SHOW VERBOSE OUTPUT"

If there is anything in the lower console you can copy it out and paste it back here using code tags.

Welcome to the ONLINE EDITOR...