Iot Lab Code
Iot Lab Code
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
#include <dht.h> //define the pin that the DHT sensor is connected
#define dht_apin A0 // Analog Pin sensor is connected to
dht DHT; (DHT IS Digital Temperature And Humidity Sensor)
void setup(){
Serial.begin(9600);
delay(500);//Delay to let system boot
Serial.println("DHT11 Humidity & temperature Sensor\n\n");
delay(1000);//Wait before accessing Sensor
}//end "setup()"
void loop(){
//Start of Program
DHT.read11(dht_apin);