Az RPi-hez még nem, csak az Arduino+DHT22 teszt sikeres volt:
//
// Arduino DHT22 test code.
//
// http://playground.arduino.cc/Main/DHTLib
//
#include
// dht variable
int dataPin = 8;
dht DHT;
// *****
// SETUP
// *****
void setup() {
// put your setup code here, to run once:
// Serial setup
Serial.begin(9600);
}
// *********
// MAIN LOOP
// *********
void loop() {
// put your main code here, to run repeatedly:
// DHT22 read and output via serial port
int readData = DHT.read22(dataPin);
float t = DHT.temperature;
float h = DHT.humidity;
// print to serial port
Serial.print("Temperature = ");
Serial.print(t);
Serial.print("°C");
Serial.print(", Humidity = ");
Serial.print(h);
Serial.println("%");
delay(2000);
}
:)