Let's interface it!
#include <dht.h>
dht DHT;
#define DHT11_PIN 7
void setup(){
Serial.begin(9600);
}
void loop()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
Serial.print("Humidity = ");
Serial.println(DHT.humidity);
delay(1000);
}
int LDR = A0; // LDR input at A0 pin
int LDRReading = 0; // to store input value of LDR
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
LDRReading = analogRead(LDR);
Serial.println(LDRReading);
delay (3000);
}
Summary :
This assignment was really nice and that was even better that my board works in the first try. Looking good for the final project!