It was easier to take the public sketch and add the ethernet stuff to it - same result, it won't work without ethernet.begin commented out.
You were right about the library, it's DHT; not DHT11
The pics should show how it's connected but there are comments in the code as well.
#include <stdio.h>
#include <LiquidCrystal.h>
#include <SPI.h>
#include <Ethernet.h>
#include "DHT.h"
#define DHTPIN 12 // what pin we're connected to
#define DHTTYPE DHT11 // DHT 11
// gnd = ground
// ucc = 5v or 3.3 v
// dat = an available aruino pin
DHT dht(DHTPIN, DHTTYPE);
// Wired Ethernet
EthernetClient client;
byte MAC_ADDR[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; // MAC of Arduino Ethernet Shield
IPAddress MY_IP(192, 168, 1, 177); // ip addrress of Ethernet Shield
void setup() {
Serial.begin(9600);
Serial.println("DHTxx test!");
Ethernet.begin(MAC_ADDR, MY_IP);
delay(1000);
dht.begin();
}
void loop() {
// Wait a few seconds between measurements.
delay(5000);
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
float h = dht.readHumidity();
// Read temperature as Celsius
float t = dht.readTemperature();
// Read temperature as Fahrenheit
float f = dht.readTemperature(true);
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
// Compute heat index
// Must send in temp in Fahrenheit!
float hi = dht.computeHeatIndex(f, h);
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" *C ");
Serial.print(f);
Serial.print(" *F\t");
Serial.print("Heat index: ");
Serial.print(hi);
Serial.println(" *F");
}