Introduction: LinkitONE and DHT11

Picture of LinkitONE and DHT11

Hi guys!

Here I will show you how to interface a DHT11 to a LinkitONE board.

Step 1: Parts Needed

Picture of Parts Needed

You will need-

1 x LinkitONE

1 x DHT11

Step 2: Connect the DHT Sensor

Picture of Connect the DHT Sensor

Connect your DHT sensor.

Connect it to the 9th pin of your LinkitONE as we are using I2C protocol to transfer data.

Step 3: Connect USB

Picture of Connect USB

Connect the LinkitONE's USB to your PC.

Step 4: Code

Now we will write this code to our IDE.

#include "DHT.h"

#define DHTPIN 9

DHT dht(9, DHT11);

void setup() {

Serial.begin(9600);

dht.begin();

}

void loop() {

int ttmp = dht.readTemperature();

Serial.print("Temperature: is ");

Serial.print(ttmp);

Serial.println(" *C");

}

Step 5: Open Serial Monitor

Picture of Open Serial Monitor

Now open serial monitor from the board menu in IDE.

Comments

About This Instructable

92views

1favorite

License:

More by kritisethi:LinkitONE SMS powered LEDLinkitONE Music Player Lights On/off on Clap With LinkitONE
Add instructable to: