knutselen met drone2...
// Example testing sketch for various DHT humidity/temperature sensors // Written by ladyada, public domain #include "DHT.h" #define DHTPIN 3 #define DHTTYPE DHT22 DHT dht(DHTPIN, DHTTYPE); char buffer[5]; void setup() { Serial.begin(9600); Serial.println("DHTxx test!"); dht.begin(); } void loop() { delay(20000); float t = dht.readTemperature(); if ( isnan(t)) { Serial.println("Failed to read from DHT sensor!"); return; } Serial.print("Temperature: "); Serial.print(t); Serial.println(" *C "); Serial.print("#S|SCHRIJF|["); Serial.print(itoa((t),buffer,10)); Serial.println("]#"); }